+ Reply to Thread
Results 1 to 5 of 5

Vlookup(ignore 0)

  1. #1
    Forum Contributor
    Join Date
    09-09-2009
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    185

    Vlookup(ignore 0)

    Hello everyone,

    How is everybody? I hope good.

    I have a vlookup formula I am having trouble with. It is looking into 2 different cells in the formula. Works good but I am having a little bit of trouble. I want the formula to look at one cell and if it has a "0" in it I want it to look at a different cell. Right now I have it to look at one cell and if it sees that, that cell is empty then it will look at the other cell. But, due to conditions out of my control I now need it to work as if the cell had a "0" in it or if that cell is empty.

    Your help is greatly appreciated. Thank you.

    '=IF(C13="","",VLOOKUP(C13,Data,IF(VLOOKUP(C13,Data,5,FALSE)="",4,5),FALSE))'
    Last edited by whatsmyname; 06-14-2010 at 12:22 AM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,598

    Re: Vlookup(ignore 0)

    ....now need it to work as if ... "0" ... or ...is empty...

    Please Login or Register  to view this content.
    Ben Van Johnson

  3. #3
    Forum Contributor
    Join Date
    09-09-2009
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    185

    Re: Vlookup(ignore 0)

    Okay. I see where you are going. The thing is, in my formula it's not weather or not C13 has a zero or is empty. It's weather or not "C13,DATA,5" has a 0 or is empty. I took your formula and tried it in a couple of different ways and I still couldn't get it to work. Any other ideas?

    Thank you so much for your help.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Vlookup(ignore 0)

    Vlookup returns a 0 if the result cell has a blank or 0 in it.. so you probably just need to change the ="" to =0

    e..g.

    =IF(C13="","",VLOOKUP(C13,Data,IF(VLOOKUP(C13,Data,5,FALSE)=0,4,5),FALSE))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  5. #5
    Forum Contributor
    Join Date
    09-09-2009
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    185

    Re: Vlookup(ignore 0)

    That did it! Great I thank you very much for your help. I knew it had to be something simple like that. I didn"t even think of that.

    Thank you. Have a nice day!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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