ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   row= cell's row (https://www.excelbanter.com/excel-worksheet-functions/98511-row%3D-cells-row.html)

wptech

row= cell's row
 

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


--
wptech
------------------------------------------------------------------------
wptech's Profile: http://www.excelforum.com/member.php...o&userid=36217
View this thread: http://www.excelforum.com/showthread...hreadid=560104


Roger Govier

row= cell's row
 
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)

--
Regards

Roger Govier


"wptech" wrote in
message ...

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


--
wptech
------------------------------------------------------------------------
wptech's Profile:
http://www.excelforum.com/member.php...o&userid=36217
View this thread:
http://www.excelforum.com/showthread...hreadid=560104




wptech

row= cell's row
 

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


--
wptech
------------------------------------------------------------------------
wptech's Profile: http://www.excelforum.com/member.php...o&userid=36217
View this thread: http://www.excelforum.com/showthread...hreadid=560104


Roger Govier

row= cell's row
 
Hi Ben

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

--
Regards

Roger Govier


"wptech" wrote in
message ...

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


--
wptech
------------------------------------------------------------------------
wptech's Profile:
http://www.excelforum.com/member.php...o&userid=36217
View this thread:
http://www.excelforum.com/showthread...hreadid=560104





All times are GMT +1. The time now is 03:41 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com