row= cell's row

W

wptech

I have a spreadsheep of 2 cells that need to be calculated by a third
cell that is on the same row as the other 2 cells. But, the rows are
always different as each row is added. Is there a function for a
formula where the row = the current row that the cell processing the
formula is in? ie.

Instead of:
=B2-(B2*C2)
=Bthisrownumber-(Bthisrownumber*Cthisrownumber)

Is something like this even possible to do? Seems like it should be.
I'm really trying to make this make sense you all. It's hard though as
I'm not a programmer and not that good with excel yet.

Thanks,
Ben
 
R

Roger Govier

Hi Ben

Just copy the formula down the page and it will change automatically to
B3-(C3*C3) and so on.

This is because the references are all relative.

You can make the Column an Absolute reference by putting a $ sign in
front of it
=$B2-($C2*$C2) where the column won't change as you copy across, but
the
row would change as you copy down.
Conversely you can make the Row reference Absolute by prefixing with a $
sign
=B$2-(C$2*C$2) where the column will alter as you copy across but the
row
will be fixed.

Finally, prefixing both column and row with $ sign fixes the cell to be
absolute and it won't change at all as you copy down or across
=$B$2-($C$2*$C$2)
 
W

wptech

Hmm, thanks for the response, the only problem is is this is
dynamically created from database. So, it's not me that's copying and
pasting, it's actually a program that on my website that has the
formula hard coded and I was seeing if I could make that row number
dynamic as it was imported in from the remote database. I think I'm
going to have to do it dynamically from the start in the php code and
then import it in as a solid number.

Thanks,
Ben
 
R

Roger Govier

Hi Ben

Maybe the following
=INDIRECT("B"&ROW())-(INDIRECT("B"&ROW())*INDIRECT("C"&ROW()))
 
Top