Using a variable as a row reference?

M

mjmorrison

I have a problem. When I type the formula

=IF(SUM(index(AidElement1,17,1),index(AidElement2,17,1),...,index(AidElement25,17,1))=0,"NB","_1040_Income")

into my first row (17) and try to use the Fill command to paste the
formula to my other rows (18-500), the row_num reference (17) does not
change. Is there a way to change the row_num reference so that it's
relative instead of absolute?

Thanks.
 
H

Henrik Wendel

In youre formula, instead of 17 use: Row() With out argument will return the
row number
that it resides in.

In row seventeen it will be 17 and in row eighteen it will be 18 and so
on...

Wendel
 
B

Bob Phillips

Use the ROW() function

IF(SUM(index(AidElement1,ROW(),1),index(AidElement2,ROW(),1),...,index(AidEl
ement25,ROW(),1))=0,"NB","_1040_Income")

Not tested, but should be okay
 

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