+ Reply to Thread
Results 1 to 10 of 10

Can lookup formula ignore blank cells until the lookup value has been entered?

  1. #1
    Registered User
    Join Date
    02-06-2013
    Location
    Nottingham
    MS-Off Ver
    Excel 365
    Posts
    61

    Can lookup formula ignore blank cells until the lookup value has been entered?

    Hi all,

    I am doing a simple LOOKUP formula: =LOOKUP($B2, $L$5:$L$10, $M$5:$M$10)

    But I am using a spreadsheet which will gradually get added to. If I apply this formula to cells where there isn't any value in B5 for example it comes back with N/A. Is it possible to amend the code for it to ignore blank cells until the look up value has been typed in?

    Many thanks

  2. #2
    Forum Contributor
    Join Date
    01-30-2013
    Location
    Wales
    MS-Off Ver
    Excel 2013
    Posts
    231

    Re: Can lookup formula ignore blank cells until the lookup value has been entered?

    Try

    =IFERROR(LOOKUP($B2, $L$5:$L$10, $M$5:$M$10), "")
    Click * below if this answer helped

  3. #3
    Registered User
    Join Date
    02-06-2013
    Location
    Nottingham
    MS-Off Ver
    Excel 365
    Posts
    61

    Re: Can lookup formula ignore blank cells until the lookup value has been entered?

    Fantastic, thanks Chris. Now lastly, someone has entered the following formula into the cell next to where the result from the Lookup goes to add another total onto the total returned:

    =G6*0.2+G6

    Because the result is now blank unless there is a lookup value entered, that formula now returns: #VALUE! Is it possible to do something similar with this one?

    Thanks again

  4. #4
    Forum Contributor
    Join Date
    01-30-2013
    Location
    Wales
    MS-Off Ver
    Excel 2013
    Posts
    231

    Re: Can lookup formula ignore blank cells until the lookup value has been entered?

    Try

    =IFERROR(LOOKUP($B2, $L$5:$L$10, $M$5:$M$10), 0)

  5. #5
    Forum Contributor
    Join Date
    01-30-2013
    Location
    Wales
    MS-Off Ver
    Excel 2013
    Posts
    231

    Re: Can lookup formula ignore blank cells until the lookup value has been entered?

    OR
    +ISERROR(G6*0.2+G6,"")

    OR
    =ISERROR(G6 *1.2,"")

    There is always more than one way.

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Can lookup formula ignore blank cells until the lookup value has been entered?

    Here's another one...

    =IF($B2="","",LOOKUP($B2,$L$5:$M$10))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Can lookup formula ignore blank cells until the lookup value has been entered?

    One way...

    =IF(COUNT(G6),G6*1.2,"")

  8. #8
    Forum Contributor
    Join Date
    01-30-2013
    Location
    Wales
    MS-Off Ver
    Excel 2013
    Posts
    231

    Re: Can lookup formula ignore blank cells until the lookup value has been entered?

    Or you could do without the formula in G6 and combine both formulas with something like
    =IFERROR(LOOKUP($B2, $L$5:$L$10, $M$5:$M$10)*1.2, 0)

  9. #9
    Registered User
    Join Date
    02-06-2013
    Location
    Nottingham
    MS-Off Ver
    Excel 365
    Posts
    61

    Re: Can lookup formula ignore blank cells until the lookup value has been entered?

    Thank you everyone. Tony that was perfect for what I need.

    Thanks again

  10. #10
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Can lookup formula ignore blank cells until the lookup value has been entered?

    You're welcome. Thanks for the feedback!

+ 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] How to ignore blank cells in Range Lookup?
    By Brand012 in forum Excel - New Users/Basics
    Replies: 9
    Last Post: 01-04-2014, 01:42 AM
  2. Ignore Blank and Zero in Lookup.
    By Battledeck in forum Excel General
    Replies: 1
    Last Post: 11-28-2012, 08:11 PM
  3. [SOLVED] How to ignore blank cells while using Lookup function
    By EAGLEBUCKS in forum Excel General
    Replies: 7
    Last Post: 08-09-2012, 03:53 PM
  4. Lookup formula - treat no-registered cells as blank
    By gublues in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 04:05 AM
  5. [SOLVED] Lookup formula - treat no-registered cells as blank
    By gublues in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 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