Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IF statement with a nested vlookup

Status
Not open for further replies.

katie2012

Technical User
Aug 28, 2013
7
US
Hi,

Can anyone please help me with my formula? I have 2 columns with different number sets in them. I am trying to look up the data from column A; unless there is data in column B, then I would like to see the data from column B. Here is an example of how my columns are set up-
Column A Column B
530126 530764
530252 N/A

So far I have =IF(ISNA(VLOOKUP(D7,Sheet1!$C:$D,2,TRUE)),"",(VLOOKUP(C7,Sheet1!$A:$B,2,FALSE))) which is working great input column A as long as B is "NA" but I am having trouble getting the number from column B to populate. Every time I try to add another nested vlookup it returns an error.

Any suggestions anyone has is helpful! I search the forum but still wasn't able to get it to work.
 
So, on your fields that return NA from your formula, are they just blank / null values in the source cell? If so, I'd suggest use ISBLANK instead of ISNA (it'll run more efficiently as well).

"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
No, they already have an "N/A" in them else I would use ISBLANK. I just need a way to return column B data when it has a value in it.
 
So do you have at in colunns C:D and A:B?

Is all the data you're working with on the same sheet?

I assume that your formula is in row 7. Am I correct?

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
I meant to say, So do you have DATA in colunns C:D and A:B? If so in what rows and please post a sample of what is in several rows for those columns.



Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
I do have data in the other columns, I have names, addresses and other numbers in the columns- no formulas
 
...and a sample of data in columns a:d WITH the results you would expect ubder eack condition, please.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top