Announcement

Collapse
No announcement yet.

IF Statement and Vlookup combined

Collapse
This topic is closed.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • IF Statement and Vlookup combined

    Afternoon All,

    I am having problems trying to combine a Vlookup and If statement.

    The formula I have written is: =IF(VLOOKUP(B386,Extensions!$A$4:$D$128,3,FALSE)="","",VLOOKUP(B386,Extensions!$A$4:$D$128,3,FALSE))

    The problem is that where the Vlookup does not find the entry in B386 I am getting the error "N/A" appearing. This is correct because the value in B386 (for example) does not exist in the sheet I am looking up.

    What I want to happen is that rather than "N/A" being shown I would like a blank space to be entered.

    Can anyone tell me how I can force a blank space (hence why have used "" within my formula) rather than the default "N/A" which the vlookup throws up?

    Regs

    MZP

  • #2
    Re: IF Statement and Vlookup combined

    How about this?
    =IF(ISNA(VLOOKUP(B386,Extensions!$A$4:$D$128,3,FALSE)),"",VLOOKUP(B386,Extensions!$A$4:$D$128,3,FALSE))
    Boo!

    Comment


    • #3
      Re: IF Statement and Vlookup combined

      This works perfectly, thank you.

      Comment


      • #4
        Re: IF Statement and Vlookup combined

        Hi,
        I am looking for some help with combining VLOOKUP and IF statements.
        The plan is to have a form with dependant drop down boxes that reply on data ranges however I want the data ranges to be defined in real time from another workbook. I.E. so they are not static ranges.
        Does anyone have any sugestions on how this could be achieved?

        Thanks in advance for your help.

        Dave

        Comment


        • #5
          Re: IF Statement and Vlookup combined

          Please start your own Thread, thanks.

          Comment

          Working...
          X