+ Reply to Thread
Results 1 to 8 of 8

VLOOKUP with empty table

  1. #1
    Registered User
    Join Date
    06-27-2016
    Location
    Vancouver
    MS-Off Ver
    2019 Pro Plus
    Posts
    70

    VLOOKUP with empty table

    hi all

    if used the formula VLOOKUP with empty table will give 1900-01-00 how keep empty table empty

    =IFERROR(VLOOKUP(B18,IF({1,0},Sheet4!$B$4:$B$502,Sheet4!$I$4:$I$502),2,0),"")

    I'd be really thankful if someone has a solution for this.

  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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,397

    Re: VLOOKUP with empty table

    As there is no second column in either of the arrays you have entered into the VLOOKUP formula, this cannot be working.
    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 Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: VLOOKUP with empty table

    Assuming the iferror is to avoid other issues, you could try checking if the current formula results in 0 (which in a date field is 1900-01-00?)

    Try:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    I also don't see the lookup array having 2 columns?
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: VLOOKUP with empty table

    @AliGW & Arkadi
    It's actually a neat little trick, and it does work.
    It the IF {1,0} bit creates a 2 column array with B and I
    Although I've previousely seen it with CHOOSE instead of IF..

    @Rocky
    The issue is that 1900-01-00 is really just a 0 with a Date Cell formatting.
    And 0 is NOT an error, therefor it will not be trapped by Iferror.

    You would have to do
    =IF(VLOOKUP(...)=0,"",VLOOKUP(...))
    Last edited by Jonmo1; 03-01-2017 at 02:52 PM.

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: VLOOKUP with empty table

    Since the cell containing the formula is formatted as a date (0 shows as 1900-01-00)
    That suggests you're expecting the resulting value of the vlookup to be a Date.

    Then try
    =IFERROR(1/(1/VLOOKUP(B18,IF({1,0},Sheet4!$B$4:$B$502,Sheet4!$I$4:$I$502),2,0)),"")

  6. #6
    Registered User
    Join Date
    06-27-2016
    Location
    Vancouver
    MS-Off Ver
    2019 Pro Plus
    Posts
    70

    Re: VLOOKUP with empty table

    thanks Arkadi This works perfectly, thank you so so much!

  7. #7
    Registered User
    Join Date
    06-27-2016
    Location
    Vancouver
    MS-Off Ver
    2019 Pro Plus
    Posts
    70

    Re: VLOOKUP with empty table

    thanks Jonmo1 also it's work thank you so much!

  8. #8
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: VLOOKUP with empty table

    R0CKY, you are welcome, glad we could help
    Please remember to mark the thread as solved if you are happy with the solutions provided? Thanks!

+ 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. Replies: 5
    Last Post: 12-07-2016, 09:18 AM
  2. Paste to first empty row in a table (NOT at the end of the table range)
    By mick0005 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-18-2015, 05:36 AM
  3. [SOLVED] macro emptying table also to work when table is empty
    By pallie in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-11-2014, 05:00 AM
  4. Delete Empty Rows and empty columns from the word table
    By mvneema in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-25-2014, 10:51 AM
  5. UserForm to transfer items from one table to another table in the next empty cell...
    By aneese11 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-04-2012, 10:31 AM
  6. Replies: 7
    Last Post: 01-20-2012, 05:52 PM
  7. Vlookup with empty cell
    By kmerid in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-09-2009, 07:33 PM

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