How to get Row # in formula?

D

DaveR

I have several rows with the same formula but they are seperated, in some
cases, by rows with other information to prevent me from just dragging a
formula down to other rows.

Ex. While in row 13: B13*C13+B13*D13+B13*E13
While in row 20: B20*C20+....

how can I write a formula to populate the "13" or "20" automatically for
whatever row I am in?

Thanks,
Dave
 
B

Bob Phillips

You may not be able to drag it, but if you copy row13 formula and go to row
20 it updates does it not?
 
D

DaveR

Thanks. I didn't realize that if I were to copy that cell and paste in
another that the row identity would come too.

That got it.
Dave
 
B

Brad

You're welcome
--
Wag more, bark less


DaveR said:
Thanks. I didn't realize that if I were to copy that cell and paste in
another that the row identity would come too.

That got it.
Dave
 
D

Dana DeLouis

how can I write a formula to populate the "13" or "20" automatically
for whatever row I am in?

Just to be different...
Add a range name formula. This macro will do it for you...

ActiveWorkbook.Names.Add Name:="fx", RefersToR1C1:= _
"=RC2*SUM(RC3:RC5)"

Now, in a cell in any column(except B:E), just enter the formula =Fx

= = = = = = =
HTH :>)
Dana DeLouis
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top