devdoe
devdoe

Reputation: 4325

How to give reference to a row number in excel formula?

I need this formula: C(n) = B(n)*A5. (n is the row number)

Literally, multiply the current selected row number in column B with A5

I tried =ROW function for creating a reference but failed.

I tried with this formula: C(2) =MULTIPLY(B=ROW(),A5) thinking it will be parsed to C(2) =MULTIPLY(B2,A5)

Upvotes: 4

Views: 42697

Answers (2)

devdoe
devdoe

Reputation: 4325

Found it.

=MULTIPLY(INDIRECT("F" & ROW()),INDIRECT(("G" & 2)))

INDIRECT(("G" & 2)) even makes it better if you want to drag and copy the functionality to all the rows below.

Upvotes: 2

ttaaoossuu
ttaaoossuu

Reputation: 7884

You have two options to accomplish this:

1. INDEX() formula:

=INDEX(B:B,ROW())*A5

2. INDIRECT() formula:

=INDIRECT("B"&ROW())*A5

Where ROW() is the number of cell you're entering this formula into.

Upvotes: 9

Related Questions