+ Reply to Thread
Results 1 to 5 of 5

IF with VLOOKUP

  1. #1
    Registered User
    Join Date
    01-27-2009
    Location
    Dundee, Scotland
    MS-Off Ver
    Excel 2003
    Posts
    8

    IF with VLOOKUP

    Hi guys

    I'm using this formula:

    =IF(Customers!B3="","",VLOOKUP(C2,Customers!A1:Customers!B84,2,FALSE))

    What I want to happen is for the cell to be empty if VLOOKUP finds nothing. It does do this but the other cells beside it come back with #N/A results. Do you know how I can keep ther other cells as they are? I've attached a demo of it so far.

    Thanks

    Si
    Attached Files Attached Files

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: IF with VLOOKUP

    Simon, it would really help if you could point out in which cell of the four sheets you'd like to apply the formula. So far, I haven't found it.

  3. #3
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: IF with VLOOKUP

    Found it. At last.

    can you explain what you want to achieve with this:

    =IF(Customers!B3="" ??

    What is the connection with the rest of the formula? Can you explain the reasoning/logic in plain words?

  4. #4
    Registered User
    Join Date
    01-27-2009
    Location
    Dundee, Scotland
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: IF with VLOOKUP

    What I want to happen is for the customers details to be transfered from the Custormers sheet to the Summary sheet once they have been selected from the drop down box on the Summary sheet.

    Not all customers need to have the country cell filled in on their details, so if this is blank then I'd like the corresponding cell on the Summary sheet to be blank too.

    Does that make any sense?

  5. #5
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: IF with VLOOKUP

    Hi,

    you cannot check a fixed cell in sheet Customers, because you won't know which row to look at.

    Your columns in sheet Customers and your columns in sheet Summary do not have the same order. Swap Town and country on the Summary sheet, so the order is the same. Then you can use just one formula for all the Vlookups, and that is this one:

    =IF(ISBLANK(VLOOKUP($C2,Customers!$A$1:$P$84,COLUMN()-2,FALSE)),"",VLOOKUP($C2,Customers!$A$1:$P$84,COLUMN()-2,FALSE))

    Put this formula in cell C2 on the summary sheet and copy right to column N. Then select C2 to N2 and copy down.

    You should adjust your range name for the data validation in column B to include only the cells that are actually populated. you may want to have a google for dynamic range names.

    hth

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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