+ Reply to Thread
Results 1 to 8 of 8

Vlookup issue

  1. #1
    Registered User
    Join Date
    04-09-2014
    Location
    Leeds
    MS-Off Ver
    Excel 2010/2016
    Posts
    14

    Vlookup issue

    Hi there

    I'm having a rather large issue trying lookup on some data that I have, as I have 7 columns that need to be looked at before returning an account reference number.

    I have data going from A2:G2 (multiple loan ref numbers) and in column H2, going vertically, I have the corresponding account reference number that covers all of the individual loan references.

    I want to be able to use a function/formula that will look at a value in a different sheet, and compare to A2:G2, and if it's there, return the H2 account reference number, but I just cannot seem to find a way, as I have never come across this issue.

    Please can someone help?

    Thanks

    Dee
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,731

    Re: Vlookup issue

    You can use this in B2 of Sheet1:

    =IFERROR(VLOOKUP(A2,Sheet2!A:H,8,0),IFERROR(VLOOKUP(A2,Sheet2!B:H,7,0),IFERROR(VLOOKUP(A2,Sheet2!C:H,6,0),IFERROR(VLOOKUP(A2,Sheet2!D:H,5,0),IFERROR(VLOOKUP(A2,Sheet2!E:H,4,0),IFERROR(VLOOKUP(A2,Sheet2!F:H,3,0),IFERROR(VLOOKUP(A2,Sheet2!G:H,2,0),"Not found")))))))

    However, none of the examples in column A have a match with those listed in Sheet2, so you will get "Not found" for them all.

    Hope this helps.

    Pete

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,731

    Re: Vlookup issue

    My reply doesn't seem to have registered on the New Posts list on in my UserCP.

    Pete

  4. #4
    Valued Forum Contributor AZ-XL's Avatar
    Join Date
    03-22-2013
    Location
    Azerbaijan, Baku
    MS-Off Ver
    Excel 2007
    Posts
    603

    Re: Vlookup issue

    This is just an alternative solution

    b2 = =IFERROR(INDIRECT(""&ADDRESS(MAX(COUNTIF(A2,Sheet2!$A$2:$G$19)*ROW(Sheet2!$A$2:$A$19)),8,4,,"Sheet2")&""),"Not Found")

    Then ctrl+Shift+Enterş
    Attached Files Attached Files
    Appreciate the help? CLICK *

  5. #5
    Valued Forum Contributor AZ-XL's Avatar
    Join Date
    03-22-2013
    Location
    Azerbaijan, Baku
    MS-Off Ver
    Excel 2007
    Posts
    603

    Re: Vlookup issue

    This is just an alternative solution

    b2 = =IFERROR(INDIRECT(""&ADDRESS(MAX(COUNTIF(A2,Sheet2!$A$2:$G$19)*ROW(Sheet2!$A$2:$A$19)),8,4,,"Sheet2")&""),"Not Found")

    Then ctrl+Shift+Enterş

  6. #6
    Registered User
    Join Date
    04-09-2014
    Location
    Leeds
    MS-Off Ver
    Excel 2010/2016
    Posts
    14

    Re: Vlookup issue

    Quote Originally Posted by AZ-XL View Post
    This is just an alternative solution

    b2 = =IFERROR(INDIRECT(""&ADDRESS(MAX(COUNTIF(A2,Sheet2!$A$2:$G$19)*ROW(Sheet2!$A$2:$A$19)),8,4,,"Sheet2")&""),"Not Found")

    Then ctrl+Shift+Enterş
    Thank you will give this a try also!

  7. #7
    Registered User
    Join Date
    04-09-2014
    Location
    Leeds
    MS-Off Ver
    Excel 2010/2016
    Posts
    14

    Re: Vlookup issue

    Hi Pete

    My replies, don't seem to be coming through either! Thank you so much for taking the time to help me though!

    I tried to incorporate your formula into the actual sheets:

    =IFERROR(VLOOKUP(A2,'[Account numbers and Loan note numbers.xlsx]Account numbers and Loan note n'!A1:H1,8,0),IFERROR(VLOOKUP(A2,'[Account numbers and Loan note numbers.xlsx]Account numbers and Loan note n'!B1:H1,7,0),IFERROR(VLOOKUP(A2,'[Account numbers and Loan note numbers.xlsx]Account numbers and Loan note n'!C1:H1,6,0),IFERROR(VLOOKUP(A2,'[Account numbers and Loan note numbers.xlsx]Account numbers and Loan note n'!D1:H1,5,0), IFERROR(VLOOKUP(A2,'[Account numbers and Loan note numbers.xlsx]Account numbers and Loan note n'!E1:H1,4,0), IFERROR(VLOOKUP(A2,'[Account numbers and Loan note numbers.xlsx]Account numbers and Loan note n'!F1:H1,3,0),IFERROR(VLOOKUP(A2,'[Account numbers and Loan note numbers.xlsx]Account numbers and Loan note n'!G1:H1,2,0), "Not Found")))))))

    But I just can't get it to work...what am I doing wrong?

    Dee

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,731

    Re: Vlookup issue

    You have used A1:H1 as the table for the first VLOOKUP (and for subsequent ones) - it should be A:H (i.e. the full columns). You can just do Find&Replace (CTRL-H) on that cell and change 1 to nothing. Your formula assumes that the file [Account numbers and Loan note numbers.xlsx] is open at the same time.

    Hope this helps.

    Pete

  9. #9
    Registered User
    Join Date
    04-09-2014
    Location
    Leeds
    MS-Off Ver
    Excel 2010/2016
    Posts
    14

    Re: Vlookup issue

    Pete! You are a genius! Thank you so so much - now I shall have to try and understand the formula!!

    It works a charm

    Dee

  10. #10
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,731

    Re: Vlookup issue

    Glad to hear it, Dee.

    If that takes care of your original question, please select Thread Tools from the menu above your first post and mark this thread as SOLVED.

    Also, since you are relatively new to the forum, I would like to inform you that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

+ 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. Another VLookup issue.
    By SamCrome in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-25-2012, 04:29 AM
  2. Vlookup issue
    By BusyEvent in forum Excel General
    Replies: 6
    Last Post: 02-02-2012, 02:28 AM
  3. VLOOKUP/MID Issue
    By SamuelT in forum Excel General
    Replies: 4
    Last Post: 10-12-2006, 05:49 AM
  4. [SOLVED] VLookup Issue
    By Shonte in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-18-2005, 05:30 PM
  5. [SOLVED] VLOOKUP ISSUE
    By Hardip in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-23-2005, 05:06 AM

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