vlookup issue?

J

joey31

This is my first time on this site and I am hoping maybe I could get
some insight. I am not an expert but I can understand code and my is as
such: I am doing a complex vlookup formula in that I find the value I
want and the corresponding value 12 columns over but the value is
empty. What I need is for the lookup to go to the next entry in the
first column if it finds an empty value in the 12th corresponding
cell.

[NAME] [12 over]
mom >> (empty)
mom >> 24

I need the lookup to get 24 and it stops at empty so it return a
blank....

Thanks
:confused:
 
C

Chris Leonard

Is this what you're after ?

=IF(VLOOKUP(1,A1:M9,12,TRUE)=0,HLOOKUP(1,A1:M9,2,TRUE),VLOOKUP(1,A1:M9,12,TR
UE))

Chris
 
J

joey31

I see what your thinking... This is what my formula looks like and wha
I am looking for is a way if possible to have it go to the next lin
physically if it see's an empty cell in the 12th column

{Before ISBLANK}
=IF(VLOOKUP($AK:$AK,$H:$H,1,FALSE)=$AK:$AK,VLOOKUP(VLOOKUP($AK:$AK,$H:$H,1,FALSE),$H:$S,12,FALSE),"")

(After ISBLANK}
=IF(VLOOKUP($AK:$AK,$H:$H,1,FALSE)=$AK:$AK,IF(NOT(ISBLANK(VLOOKUP(VLOOKUP($AK:$AK,$H:$H,1,FALSE),$H:$S,12,FALSE))),VLOOKUP(VLOOKUP($AK:$AK,$H:$H,1,FALSE),$H:$S,12,FALSE),""),"")

Something like this...

Thank
 
C

Chris Leonard

I'm not sure I understand what you're trying to do.

If you want to find a match and then go across 12 columns and return the
value in the 12th column against the match then use VLOOKUP.

If when you return the value in the 12th column against the lookup and find
it's zero then test for this with an IF statement. So:

IF(vlookup(...)=0,do nothing,vlookup(...))

Now, you don't want to do nothing you want to move to the next line - do you
mean the next column across or the next row down ?

For the next row down use HLOOKUP, you know the seach value exists so you
just need to move down the column and not across it.

For the column use VLOOKUP but this time go to row 13 and not 12.

Am I on the right track ?

Chris
 

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

Similar Threads


Top