+ Reply to Thread
Results 1 to 16 of 16

Is this a VLOOKUP function?

  1. #1
    Registered User
    Join Date
    04-11-2016
    Location
    UK
    MS-Off Ver
    15
    Posts
    7

    Is this a VLOOKUP function?

    I want to pull information from cell AQ into cell P2 IF it contains the information in cells K to O that is the same as K2 to O2.

    I've tried using =VLOOKUP( AND(K2, L2, M2, N2, O2), AND(K:K,L:L,M:M,N:N,O:O ), AQ:AQ ) but with no luck (as you can probably tell I'm new to using it).

    Is VLOOKUP the correct function for this purpose? Any help is greatly appreciated on this as I'm still relatively new to Excel
    Attached Files Attached Files
    Last edited by paulh267; 04-11-2016 at 06:57 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,502

    Re: Is this a VLOOKUP function?

    I think attaching a sample file showing your data might help here.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Is this a VLOOKUP function?

    Quote Originally Posted by AliGW View Post
    I think attaching a sample file showing your data might help here.
    It would also help if you manually enter the results you're expecting into that sample file to aid your explanation.

  4. #4
    Registered User
    Join Date
    04-11-2016
    Location
    UK
    MS-Off Ver
    15
    Posts
    7

    Re: Is this a VLOOKUP function?

    Thanks for fast replies. I have added a sample xlsm file to the OP.

  5. #5
    Registered User
    Join Date
    04-11-2016
    Location
    UK
    MS-Off Ver
    15
    Posts
    7

    Re: Is this a VLOOKUP function?

    Quote Originally Posted by jason.b75 View Post
    It would also help if you manually enter the results you're expecting into that sample file to aid your explanation.
    In this given example I am expecting P2 to display '2555518HDHHTXL' as K14 to O14 contain the same values as K2 to O2.
    Last edited by paulh267; 04-11-2016 at 07:17 AM.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,502

    Re: Is this a VLOOKUP function?

    I don't understand at all - sorry! Can you try to explain in detail how you arrive at that answer?

  7. #7
    Registered User
    Join Date
    04-11-2016
    Location
    UK
    MS-Off Ver
    15
    Posts
    7

    Re: Is this a VLOOKUP function?

    Quote Originally Posted by AliGW View Post
    I don't understand at all - sorry! Can you try to explain in detail how you arrive at that answer?
    So if a row has the same K to O values that the row with the equation on, we want it to copy the value in column AQ to the cell with the equation.

    In this example: Row 14 has the same values in columns K to O as row 2, so it should copy the value in cell AQ14 to cell P2 (the cell with the equation in). The value in AQ14 is 2555518HDHHTXL

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,502

    Re: Is this a VLOOKUP function?

    Is this table constantly growing? If so, do new entries get added at the top or the bottom?

  9. #9
    Registered User
    Join Date
    04-11-2016
    Location
    UK
    MS-Off Ver
    15
    Posts
    7

    Re: Is this a VLOOKUP function?

    Quote Originally Posted by AliGW View Post
    Is this table constantly growing? If so, do new entries get added at the top or the bottom?
    Yeah, it does. We currently have over 12,000 rows on our main database. Do you know if there's a way to limit the number of values it pulls into the cell also?

  10. #10
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Is this a VLOOKUP function?

    One observation, the value, 103 in cell N14 is formatted as text, which cannot be directly compared to the value, 103 in cell N2, which is formatted as a number. You need the format to be consistent for this to work.

    Once you have corrected the format of N14, enter this formula into P2, and confirm it as an array formula.

    =IFERROR(INDEX($AQ$2:$AQ$15,MATCH(2,1/(($K$2:$K$15=K2)*($L$2:$L$15=L2)*($M$2:$M$15=M2)*($N$2:$N$15=N2)*(ROW($K$2:$K$15)<>ROW(K2))))),"")

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

    edit:-

    That might struggle to cope with 12,000 rows, maybe a helper column is needed.
    Last edited by jason.b75; 04-11-2016 at 07:27 AM.

  11. #11
    Registered User
    Join Date
    04-11-2016
    Location
    UK
    MS-Off Ver
    15
    Posts
    7

    Re: Is this a VLOOKUP function?

    Quote Originally Posted by jason.b75 View Post
    One observation, the value, 103 in cell N14 is formatted as text, which cannot be directly compared to the value, 103 in cell N2, which is formatted as a number. You need the format to be consistent for this to work.

    Once you have corrected the format of N14, enter this formula into P2, and confirm it as an array formula.

    =IFERROR(INDEX($AQ$2:$AQ$15,MATCH(2,1/(($K$2:$K$15=K2)*($L$2:$L$15=L2)*($M$2:$M$15=M2)*($N$2:$N$15=N2)*(ROW($K$2:$K$15)<>ROW(K2))))),"")

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

    edit:-

    That might struggle to cope with 12,000 rows, maybe a helper column is needed.
    Thanks for the help

  12. #12
    Registered User
    Join Date
    04-11-2016
    Location
    India
    MS-Off Ver
    2010
    Posts
    1

    Re: Is this a VLOOKUP function?

    Hi All,

    Happy to interact with you all though this forum.

    My VLOOKUP is not working Yes / No options
    I have given the formula like the below to check Yes / no options.



    =IF(D6="No","",IF(F6<>"",VLOOKUP(F6,'Compliance Base'!$G$1:$H$19,2),""))

    For yes it is working properly but while " NO" it is returning #N/A.

    I am also attaching screenshot to have immediate response.

    Please let me know what I am missing here.
    Appreciate your help.

    Regards,
    JJ

  13. #13
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Is this a VLOOKUP function?

    srijaa,

    Please take a moment to read the forum rules, once you have familiarised yourself with them please start your own thread.

    http://www.excelforum.com/forum-rule...rum-rules.html

  14. #14
    Registered User
    Join Date
    04-11-2016
    Location
    UK
    MS-Off Ver
    15
    Posts
    7

    Re: Is this a VLOOKUP function?

    Quote Originally Posted by jason.b75 View Post
    One observation, the value, 103 in cell N14 is formatted as text, which cannot be directly compared to the value, 103 in cell N2, which is formatted as a number. You need the format to be consistent for this to work.

    Once you have corrected the format of N14, enter this formula into P2, and confirm it as an array formula.

    =IFERROR(INDEX($AQ$2:$AQ$15,MATCH(2,1/(($K$2:$K$15=K2)*($L$2:$L$15=L2)*($M$2:$M$15=M2)*($N$2:$N$15=N2)*(ROW($K$2:$K$15)<>ROW(K2))))),"")

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

    edit:-

    That might struggle to cope with 12,000 rows, maybe a helper column is needed.
    Jason, do you know if there is a way of it pulling in 4 results separated by a “|” character?

  15. #15
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Is this a VLOOKUP function?

    Paul, welcome to the forum

    Don't quote whole posts -- it's just clutter. If you are responding to a post out of sequence, limit quoted content to a few relevant lines that makes clear to whom and what you are responding

    For normal conversational replies, try using the QUICK REPLY box below.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  16. #16
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Is this a VLOOKUP function?

    There is a way, but I wouldn't recommend it. The formula was before you mentioned 12,000 rows of data, which I think it will struggle with, if you want to pull 4 answers per row, then you're effectively increasing it to 48,000 rows. Maybe time to borrow one of NASA's supercomputers.

    Before we start looking at more efficient methods, one thing that will probably need allowing for. On the assumption that there could be more than 4 entries which match in all 4 columns, how do we decide which 4 should be shown?

    Say for example, you wanted the results based on the 4 highest values in column H (I chose that column because all of the entries in the sample have the same value), what should we use as tiebreak criteria (if critical).

+ 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. [SOLVED] Trying to Multiply the result of an IF function combined with a VLOOKUP function
    By ucca in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-28-2018, 02:32 AM
  2. Replies: 2
    Last Post: 01-15-2014, 11:40 PM
  3. Need help nesting an index/match function within a Vlookup function.
    By Christopher135 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-04-2013, 06:16 PM
  4. Worksheet function Vlookup and VLOOKUP return different results
    By zandero in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-08-2010, 08:24 AM
  5. Replies: 1
    Last Post: 12-02-2005, 09:35 AM
  6. HOW DO I NEST THE VLOOKUP FUNCTION WITH THE LEFT FUNCTION
    By CHAIM in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  7. vlookup function-Can vlookup command find the data from the 5 sheets.
    By Rishab shah in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM

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