+ Reply to Thread
Results 1 to 5 of 5

Thread: Vlookup and exact functions

  1. #1
    Registered User
    Join Date
    01-20-2011
    Location
    Manchester
    MS-Off Ver
    Excel 2007
    Posts
    8

    Vlookup and exact functions

    Hello all,

    I am doing a Vlookup between two excel files. The two files both have an account number column and a surname column which is the same. I have setup a few vlookups which look up the account number of a customer and then bring in the address fields (separate vlookups for each address field).

    The data is very sensitive regarding account information, so for that reason I would like to add to the lookup functions another check, that checks the surnames match as well before the address field is moved across.

    I imagine I would have to somehow return the cell reference of the surname in the second file (as it could be anywhere depending on what row the account number is in) after the vlookup is done and then use the exact function to check if it matches the surname in the first file.

    Any help with this is much appreciated.

    Kind regards, Mike

  2. #2
    Forum Moderator DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Suffolk, UK
    MS-Off Ver
    2002, 2007 & 2010
    Posts
    21,423

    Re: Vlookup and exact functions

    Why not concatenate # & Name into a single field and then base subsequent calculations on the location of the matching concatenation ?

  3. #3
    Registered User
    Join Date
    01-20-2011
    Location
    Manchester
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Vlookup and exact functions

    Hi there,

    Thanks for your quick response.

    I'm not too sure I follow what you mean!

  4. #4
    Forum Moderator DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Suffolk, UK
    MS-Off Ver
    2002, 2007 & 2010
    Posts
    21,423

    Re: Vlookup and exact functions

    It's hard to give specific examples with no range information but you mention you have account number column and surname column and you wish to conduct matches based on both fields (not just account #)

    If you concatenate the two columns into a new single column you can search based on the concatenation

    For sake of simplicity I will use a single workbook example - 2 sheets - Sheet1 & Sheet2

    Sheet1 Col A has #, B has Name
    Sheet2 Col A has #, B has Name and C has address
    Sheet1 Col C is to retrieve the appropriate Address value from Sheet2 for the # & Name combination as determined by values in A & B on Sheet1

    We can add a column to Sheet2

    Sheet2!D1:
    =A1&"@"&B1
    copied down for all of our data
    We can then use the above in our Calculations on Sheet1

    Sheet1!C1:
    =INDEX(Sheet2!$C:$C,MATCH($A1&"@"&$B1,Sheet2!$D:$D,0))
    copied down
    In short the concatenation on Sheet2 allows to conduct "multi criteria" searches using a single criteria.

  5. #5
    Registered User
    Join Date
    01-20-2011
    Location
    Manchester
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Vlookup and exact functions

    Brilliant. Thank you very much!

    I was trying to build some complex formula and this solves it.

    Thanks once again!

    Kind regards, Mike

+ 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.2.0