MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Formula


Posted by Jacqueline George on January 21, 2002 3:26 AM

How can I copy a Formula that has been written to a certain cell to satisfy another cell.
e.g
If the formula in one cell is
COUNTIF(A2:A5,"Female")
I want the same formula with the same range to be applied in another cell . How can I copy it.

Thanks in advance


Posted by Michael on January 21, 2002 5:27 AM

The easiest way is to right click on the cell, select copy, click the cell where you want it to go and select Paste Special and then select Formula. Now something to watch for is that Shifting of the Cell Range.(Where it might go from A1:B1 to say F1:G1 if you pasted the formula to a cell 5 columns from the original.) The way aroung this is to us the $ symbol ($A$1:$B$1)Put this in to the formul for all cell identifiers and you won't have any problems.