+ Reply to Thread
Results 1 to 14 of 14

How to include the match formula in vlookup

  1. #1
    Registered User
    Join Date
    07-22-2013
    Location
    hyderabad
    MS-Off Ver
    Excel 2010
    Posts
    9

    How to include the match formula in vlookup

    I am having x unique values A column and different values in B and C column's. How can I concatenate the B and C values which are having a unique value in column A
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to include the match formula in vlookup

    Since the data is already sorted by column A, this is pretty easy.

    1) In D2: =IF(A2=A3,D3&","&B2,B2)
    2) Copy D2 down the dataset

    3) In E2: =IF(A2=A1, "", D2)
    4) Copy E2:E38

    5) Click on D2 and do a PASTE SPECIAL > VALUES
    6) Clear column E
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    07-22-2013
    Location
    hyderabad
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: How to include the match formula in vlookup

    Thanks JBeaucaire
    It is very usefull

  4. #4
    Registered User
    Join Date
    07-22-2013
    Location
    hyderabad
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: How to include the match formula in vlookup

    Could you help if data is not sorted

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to include the match formula in vlookup

    Yes, new step 1) is

    1) Sort the data by Column A.

  6. #6
    Registered User
    Join Date
    07-22-2013
    Location
    hyderabad
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: How to include the match formula in vlookup

    with out sorting the Column A, is any another way to get the output

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How to include the match formula in vlookup

    you are not with a simple formula,you will need code to do that especially since i think your list is longer than that
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  8. #8
    Registered User
    Join Date
    07-22-2013
    Location
    hyderabad
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: How to include the match formula in vlookup

    By sorting the Column A I can easily get the same out put, but I need the same output without sorting the Column A. below is code for by sorting the column A

    1) In D2: =IF(A2=A3,D3&","&B2,B2)
    2) Copy D2 down the dataset
    3) In E2: =IF(A2=A1, "", D2)

    4) Copy E2:E38
    5) Click on D2 and do a PASTE SPECIAL > VALUES

    6) Clear column E

  9. #9
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How to include the match formula in vlookup

    how are you going to get all those in one cell? youl need loads of helper columns and concatenate them

  10. #10
    Registered User
    Join Date
    07-22-2013
    Location
    hyderabad
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: How to include the match formula in vlookup

    For that any code or any script is there? if possible could you please post it.

  11. #11
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How to include the match formula in vlookup

    no idea !i'll ask someone

  12. #12
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to include the match formula in vlookup

    Ok, wasn't as hard as I'd though with no VBA, just a change to the formulas:


    1) In D2: =IF(ISNUMBER(MATCH(A2,A3:A10000, 0)), INDEX(D3:D10000, MATCH(A2,A3:A10000, 0))&","&B2,B2)
    2) Copy D2 down the dataset

    3) In E2: =IF(ISNUMBER(MATCH(A2, $A$1:$A1, 0)), "", D2)
    4) Copy E2:E10000

    5) Click on D2 and do a PASTE SPECIAL > VALUES
    6) Clear column E


    Make sure the part of the formula in red is far enough down to encompass the whole dataset.

  13. #13
    Registered User
    Join Date
    07-22-2013
    Location
    hyderabad
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: How to include the match formula in vlookup

    Thank you very much jerry.

  14. #14
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to include the match formula in vlookup

    I've marked this thread as SOLVED for you.
    Next time, select Thread Tools from the links above and mark this thread as SOLVED. 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. Index match formula tweeking to include sumif
    By MZing81 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-28-2012, 01:14 PM
  2. Replies: 5
    Last Post: 03-01-2012, 05:08 AM
  3. [SOLVED]how to include the dropdownlist in VLOOKUP formula
    By blues_oo7 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-22-2010, 10:09 AM
  4. include multiplication formula to VLOOKUP
    By mervin in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-30-2008, 07:02 PM
  5. Modifying VLOOKUP formula to include ROUND
    By th1chsn in forum Excel General
    Replies: 1
    Last Post: 02-17-2005, 01:34 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