+ Reply to Thread
Results 1 to 4 of 4

How to avoid lookup errors when no data in lookup range

  1. #1
    Forum Contributor
    Join Date
    10-28-2014
    Location
    Sydney
    MS-Off Ver
    Professional 2010
    Posts
    151

    How to avoid lookup errors when no data in lookup range

    LOOKUP(2,1/($A$2:A10<>""),$A$2:A10)="X"

    How do you avoid errors when there is no "X" in the lookup range?

    Thanks

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,369

    Re: How to avoid lookup errors when no data in lookup range

    Maybe try:

    =IFERROR(LOOKUP(2,1/($A$2:A10<>""),$A$2:A10)="X","")
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    10-28-2014
    Location
    Sydney
    MS-Off Ver
    Professional 2010
    Posts
    151

    Re: How to avoid lookup errors when no data in lookup range

    IFERROR and prioritisation sorted it out.

    Agree, thanks for your help.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,369

    Re: How to avoid lookup errors when no data in lookup range

    You're welcome!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Nest lookup Function to lookup name between date range and return value
    By bbeards in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-17-2018, 01:37 PM
  2. How to lookup a value in a table using a range in the lookup columns
    By premis in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-03-2016, 02:47 PM
  3. [SOLVED] VLOOKUP, gives #N/A error (if Range lookup=0) or wrong data (if Range lookup=empty)
    By Ebalinska in forum Excel Formulas & Functions
    Replies: 19
    Last Post: 01-14-2016, 05:55 AM
  4. How to use vlookup if value of lookup cell is same in lookup range
    By anujteetwal in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-09-2014, 05:15 AM
  5. [SOLVED] Lookup help - can lookup address values that fall within a range?
    By Ruthie83 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-16-2013, 10:25 PM
  6. [SOLVED] Index/Match - how to avoid same lookup if there are duplicates?
    By consulttk in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-16-2012, 02:40 PM
  7. VBA Lookup errors
    By dontich in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-18-2012, 11:33 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1