tags:

views:

160

answers:

2

Hi,

is is possible in Excel to have some sort of fixed function defined for a entire column? This function needs to persist when a row is deleted, and it needs to 'exist' when new row data is added...

So in the example below, If I cut row 1 to row 3 (so the worksheet is empty), I want the 'new' row 1 to have the function in column D already defined (which is actually: multiply the value from C from the same row with 10)... Is this possible?

-----------------------------------------
|    A    |    B    |    C    |    D    |
-----------------------------------------
|    1    |    1    |    1    |=C1 * 10 |  --- ROW 1
-----------------------------------------
|    1    |    1    |    1    |=C2 * 10 |  --- ROW 2
-----------------------------------------
|    1    |    1    |    1    |=C3 * 10 |  --- ROW 3
-----------------------------------------
|         |         |         |         |
-----------------------------------------
|         |         |         |         |
-----------------------------------------
A: 

If you copy the cell with the function in it, then click the column header (to select all of it) that you want the function to persist in, then right click - paste special - formuals, that should do the trick.

Chalkey
I'm not pasting... i'm cutting?
Ropstah
Write the function at least once, then paste it into every cell of the column using paste special. Then when you cut row 1 and paste into 3 the function will be there already.
Chalkey
Again: I'm NOT pasting, only cutting
Ropstah
Dont cut the formula cell then...http://en.wikipedia.org/wiki/Cut_and_paste
Chalkey
I need to cut the formula, because I need the value in another workbook (where I AM pasting)..... I think you should lay off the pills ;)
Ropstah
So you are pasting :)... any way, am totally lost.
Chalkey
+1  A: 

In Excel 2007 this type of functionality is built in, so long as the data is marked as a table.

Select your data range and click on 'Insert - Table' alternately Ctrl-l or Ctrl-t

Add a new column heading and your formula next to the last column of data. The table will automatically expand to include the new column. It will automatically copy the formula down to all rows.

Any new rows added will automatically have the formula included.

Robert Mearns
I'm working with Excel 2003, is there a similar solution?
Ropstah
A yes there is, tables are not very intuitive ;)
Ropstah
They are called Lists in 2003, renamed tables in 2007 and they have been greatly improved.
Robert Mearns