+ Reply to Thread
Results 1 to 5 of 5

Need Macro to Concatenate and Vlookup the result.

  1. #1
    Registered User
    Join Date
    11-29-2014
    Location
    Hong Kong
    MS-Off Ver
    2007-2013
    Posts
    2

    Need Macro to Concatenate and Vlookup the result.

    Hey Everyone,

    I just came across this amazing forum.
    Spent alot of time reading it.

    Therefore thought why not i should try my luck here too.

    I have attached a file.
    It has 2 Tabs "Historical" and "Data"

    What i want to do, in one single Macro

    Historical Tab
    Concatenate Columns (B2,E2,G2,L2,N2) and show result in last empty Column which is U2.
    same for the next row. Columns (B3,E3,G3,L3,N3) and show result in last empty Column which is U3.
    And goes on for the whole historical file.

    Data tab.
    Concatenate Columns (B2,E2,G2,L2,N2) and show result in last empty Column which is U2.
    same for the next row. Columns (B3,E3,G3,L3,N3) and show result in last empty Column which is U3.
    And goes on for the whole Data file.

    Data tab.
    In Column V2, Now i want to compare the result of Historical tab U2 and Data tab U2.
    to show if they match or not.
    If they match, it is a duplicate. if not then it is ok.

    If there is another post that has a solution to this, please mark it down for me to look at it.
    otherwise, please help provide the solution for this.
    thanks.

    let me know if any questions.

    PIR - Copy.xls

  2. #2
    Forum Contributor
    Join Date
    02-19-2005
    Location
    Gurgaon,India
    MS-Off Ver
    2007,2010,2013
    Posts
    180

    Re: Need Macro to Concatenate and Vlookup the result.

    U2 on Data tab,

    =IF(ISNUMBER(MATCH(B2&E2&G2&L2&N2,INDEX(Historical!B:B&Historical!E:E&Historical!G:G&Historical!L:L&Historical!N:N,0,0),0)),"Duplicate","OK")

    copy down the formula
    Kris

  3. #3
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Need Macro to Concatenate and Vlookup the result.

    Here you go, your sample workbook with the code added.
    Attached Files Attached Files
    Happy Computing ,

    Xlbiznes.

    To show your appreciation please click *

  4. #4
    Registered User
    Join Date
    11-29-2014
    Location
    Hong Kong
    MS-Off Ver
    2007-2013
    Posts
    2

    Re: Need Macro to Concatenate and Vlookup the result.

    Thanks both the members. this is amazing
    Both the formula and the macro works.

    thank you so much! I am loving this forum!!!!

  5. #5
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Need Macro to Concatenate and Vlookup the result.

    You are welcome.

+ 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. VLOOKUP combined with CONCATENATE faulty result
    By microbase in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-17-2014, 10:56 AM
  2. [SOLVED] VLookup with concatenate not producing result
    By Sc0tt1e in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-20-2014, 11:08 AM
  3. [SOLVED] Vba Macro containing Vlookup function then enter result in a specific cell
    By BlueEdge in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-09-2014, 08:06 AM
  4. CONCATENATE Result
    By Koda7 in forum Excel General
    Replies: 2
    Last Post: 05-23-2011, 11:54 AM
  5. result of concatenate
    By Bakar in forum Excel General
    Replies: 2
    Last Post: 05-13-2011, 01:45 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