ISERROR and INDEX Funcion question

F

Flipper

I have the following formula in column 4, row 4 of a multi row/column
spreadsheet, where I am referencing a value from one worksheet and looking
for the same value in an adjacent worksheet. It's basically a VLOOKUP
function.

=IF(ISERROR(INDEX('Daily Activity'!$A$1:$B$77,SMALL(IF('Daily
Activity'!$A$1:$A$77=$B4,ROW('Daily
Activity'!$A$1:$A$77)),ROW(1:$1)),2)),"",INDEX('Daily
Activity'!$A$1:$B$77,SMALL(IF('Daily Activity'!$A$1:$A$77=$B4,ROW('Daily
Activity'!$A$1:$A$77)),ROW(1:$1)),2))

The function works as I want it to; however, if I copy the formula exactly
as is to say column 6, row 4, and then change the range from A1:a77 to
A81:A90, then the formula does not work. I can't figure out why. Can anyone
help?

Thanks.
 
B

Bob Phillips

See if this version is amendable

=IF(ISERROR(INDEX('Daily Activity'!$A$1:$B$77,SMALL(IF('Daily
Activity'!$A$1:$A$77=$B4,ROW('Daily Activity'!$A$1:$A$77)-MIN(ROW('Daily
Activity'!$A$1:$A$77))+1),ROW(1:$1)),2)),"",
INDEX('Daily Activity'!$A$1:$B$77,SMALL(IF('Daily
Activity'!$A$1:$A$77=$B4,ROW('Daily Activity'!$A$1:$A$77)-MIN(ROW('Daily
Activity'!$A$1:$A$77))+1),ROW(1:$1)),2))
 
F

Flipper

Hi Bob
Thanks for the quick response. the new formula does not work either. I
obviously don't understand why changing the "lookup" range causes the formula
not to work. I want it to do the same thing, just based on a different range
of data.
 
T

T. Valko

Ok, here's one way that the formula can be written...

Let's assume that you want the formula entered in cell C4 then copied down.

Array entered:

=IF(ROWS(C$4:C4)>COUNTIF('Daily Activity'!
A$1:A$77,B$4),"",INDEX('Daily Activity'!B:B,
SMALL(IF('Daily Activity'!A$1:A$77=B$4,ROW
('Daily Activity'!A$1:A$77)),ROWS(C$4:C4))))
 
F

Flipper

I'm probably doing something wrong, because this doesn't work correctly
either. It does return a value, but it's the wrong one.
 

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