Solved

# If NA return 0 if populated return 1

Posted on 2014-11-28
81 Views
Column P contains the results of a Vlookup.

How can I change the formula so that the cells display a value of 1 when the Vlookup returns a name and 0 when the lookup returns N/A?

Thanks
Rob
Supplier-Partnership-Criteria.xlsx
0
Question by:robmarr700
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 2

LVL 85

Accepted Solution

Rory Archibald earned 500 total points
ID: 40470296
One way:

=IF(ISNA(MATCH(A5,'C:\Angla Elvin\Supplier and Member Figures\[Oct14_Final_Members.xlsm]Supplier Preference1_PT'!\$A:\$A,0)),0,1)
0

Author Comment

ID: 40470301
That's great, good job!
0

LVL 23

Expert Comment

ID: 40470507
marginally simpler, perhaps?
=IF(ISTEXT(VLOOKUP(A5,'C:\Angla Elvin\Supplier and Member Figures\[Oct14_Final_Members.xlsm]Supplier Preference1_PT'!\$A:\$A,1,FALSE)),1,0)

Not sure if the Match adds very much in the option above, but I may be missing something?
0

LVL 85

Expert Comment

ID: 40470585
How is that simpler out of interest?

MATCH is faster than VLOOKUP. ;)
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
###### Suggested Courses
Course of the Month5 days, 22 hours left to enroll