Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: IF and Vlookup blank cell

  1. #1
    New Member
    Join Date
    Feb 2002
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I have column called prodID and when an ProdID is entered a vlookup is done to another sheet and enters the description, etc. When a Prod ID isn't entered the othe columns have the #N/A which should be blank. How can I make these cells blank?

    This is what I have
    =VLOOKUP(A13,Supplies!$A$5:Supplies!$B$30,2)

    I have tried putting an IF statement like this
    =IF(A13 = " ", B13 = " ", =VLOOKUP(A13,Supplies!$A$5:Supplies!$B$30,2))
    but this doesn't work.

    Any help appreciated, thanks

  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Denver, CO
    Posts
    1,743
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    you could use
    =IF(COUNTIF(Supplies!$A$5:$A$20,Sheet1!A13),VLOOKUP(A13,Supplies!$A$5:$B$20,2,0),"")

    which will return a "" if it doesn't not exist.

    Good luck

  3. #3
    New Member
    Join Date
    Feb 2002
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I tried that and it does give me a blank but when when I enter the correct Id it is still blank.

    =IF(A13=" "," ",VLOOKUP(A13,Supplies!$A$5:Supplies!$B$30,2))

    I don't understand why that doesn't work. When the Id is entered it displays the description but when it is blank I get the #N/A.

  4. #4
    New Member
    Join Date
    Feb 2002
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Ah, it works now
    =IF(A13=" "," ",VLOOKUP(A13,Supplies!$A$5:Supplies!$B$30,2))

    It was the A13=" "
    When it should have been a A13"".

    I thought it should be a blank, oh well it works..

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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