HP Forums

Full Version: Spreadsheet app insert column
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there a way to insert a column? Nothing obvious comes up when I highlight the heading.
Simply enter for example "=Row^2", that is the way to enter formulas for a whole column.
Arno
Not really what I want. I have an existing sheet and I need to add a column between two existing ones. Eg, I have net and "purchase price" and I want to put "additional" and "down payment" between them.
Hello,
Unfortunately, there is no easy way to do so...

The easiest might be a copy/paste operation

Cyrille
(06-19-2017 09:13 AM)cyrille de brébisson Wrote: [ -> ]Hello,
Unfortunately, there is no easy way to do so...

The easiest might be a copy/paste operation

Cyrille

copy and paste did not seem to work with the formulas. I ended up just recreating the whole darn thing.
hello,

Sorry, yes, formulas don't get updated.

Cyrille
You can use the programs below to insert and delete columns:

PHP Code:
EXPORT InsertCol(c)
BEGIN
 local rs
,cs;
 
rs:=SIZE(A:A);
 
cs:=SIZE(1:1);
 FOR 
I FROM c TO cs DO
  FOR 
J FROM 1 TO rs DO
   
Cell(J,cs-I+c+1,−1):=Cell(J,cs-I+c,−1);
  
END;
 
END;
 FOR 
J FROM 1 TO rs DO
  
Cell(J,c,−1):=Cell(J,cs+1,−1);
 
END;
 
"all done";
END;

EXPORT DeleteCol(c)
BEGIN
 local rs
,cs;
 
rs:=SIZE(A:A);
 
cs:=SIZE(1:1);
 FOR 
I FROM c TO cs DO
  FOR 
J FROM 1 TO rs DO
   
Cell(J,I,−1):=Cell(J,I+1,−1);
  
END;
 
END;
 
"all done";
END

Example: If you want to insert a column at B just go to the home or cas view and type InsertCol(2). Similar for DeleteCol.

I'm working on a similar method to insert and delete rows.

Eventually, as time permits, I plan to use the Curser variable to locate where to insert or delete, and hijack the plot key to display a pop up menu asking how many rows or columns.

-road
Reference URL's