Solved

If NA return 0 if populated return 1

Posted on 2014-11-28
4
76 Views
Last Modified: 2014-11-28
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
Comment
Question by:robmarr700
  • 2
4 Comments
 
LVL 85

Accepted Solution

by:
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

by:robmarr700
ID: 40470301
That's great, good job!
0
 
LVL 23

Expert Comment

by:Danny Child
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

by:Rory Archibald
ID: 40470585
How is that simpler out of interest?

MATCH is faster than VLOOKUP. ;)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now