+ Reply to Thread
Results 1 to 3 of 3

VLOOKUP - US values brought back as empty UK values

  1. #1
    Registered User
    Join Date
    11-05-2014
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    9

    VLOOKUP - US values brought back as empty UK values

    I'm having some difficultly with a vlookup.

    I have a table that contains a lot of our customer information for both the UK & US. On my report I need to flag a column as "Y" if a customer is Diverse (this will only ever apply to US customers).

    However when I do a simple VLOOKUP if CUSTOMER #1 has a UK record before a US one, it pulls this across incorrectly (blank instead of "Y").

    I.e. I have this table:

    Customer | Country | Diverse

    A1| Edge | UK | N
    A2| Edge | US | Y
    A3| Smiths | UK | N


    My report needs to show this

    Customer | Spend | Diverse
    A1| Edge | 100 | Y
    A2| Smiths | 67 | N


    If i put: =IF(VLOOKUP('Report'!A1,'Lookup'$1:$1048576,2,0)="US","Y","") it returns the cell as blank.

    Eventually I need to do some more complex formulas later on but how can I get my VLOOKUP to register that there is a US line and return a "Y" value? Also, I can't just build upon the other table as it is the look-up table for other pages on the report.

    Thanks
    Alan
    Last edited by AlanoR; 12-08-2014 at 12:57 PM.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: VLOOKUP - US values brought back as empty UK values

    Try this

    =IF(ISNUMBER(MATCH('Report'!A1&"*US*",INDEX('Lookup'!$A$1:$A$14&$B$1:$B$14,),0)), "Y","")
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    11-05-2014
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    9

    Re: VLOOKUP - US values brought back as empty UK values

    Worked perfectly, 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. Need to verify Bad Dates & Empty values & '0' Values in different columns
    By dmraokanuri in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-01-2014, 02:47 AM
  2. Replies: 3
    Last Post: 01-23-2014, 01:30 PM
  3. [SOLVED] Vlookup values problem - if the cell empty
    By ALEZI in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-26-2013, 02:09 PM
  4. Cell value brought back from the end ot a table
    By raphiduani in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-18-2012, 04:10 AM
  5. Replies: 7
    Last Post: 01-20-2012, 05:52 PM

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