How to get vlookup to not lookup search value is blank
Hello -
I have several sheets that link together. The Client Profile is the "master sheet" were 85% of data is contained. As a new client is added, a client # is assigned to that person. Then on the next sheet - the Account Profile sheet, we enter the assigned client # and I have a simple Vlookup.
We ran across an issue were a client was entered on the Client Profile but no Client # was assigned - should be rare but it might happened. On the Account Profile, it started to pull that clients information into any row that had a Client # that was blank.
Screenshot of Client Profile that has Client number assigned
Screenshot of formula
Because Client #2 is blank - it kept pulling the one client profile that was not assigned a client #. What can I add to my vlookup that says if Client #2 or Entity #2 is blank, don't do the lookup?
Thanks in advance!
Answers
-
@Christina Reid You can add IF and isblank to the beginning...
=IF(isblank([Client # 2]@row),"", Your VLOOKUP formula here)
If you want to include Entity # 2 in the If statement...
=if(or(isblank([Client # 2]@row), isblank([Entity # 2]@row)), "", Your VLOOKUP formula here)
See if that helps.
**Also, VLOOKUPs are great but if someone moves one of your columns out of order, it could break. Try to learn Index/match instead. It gives the same result, but it will not break if your columns move.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.1K Get Help
- 444 Global Discussions
- 142 Industry Talk
- 472 Announcements
- 5K Ideas & Feature Requests
- 83 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 489 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!