+ Reply to Thread
Results 1 to 4 of 4

Macro that concatenates data, compares against another sheet & can add text in a desc cell

  1. #1
    Registered User
    Join Date
    07-16-2012
    Location
    NY, USA
    MS-Off Ver
    Excel 2010
    Posts
    19

    Macro that concatenates data, compares against another sheet & can add text in a desc cell

    Hello, I am not that familiar with VBA/Macros so this might be asking too much.

    I have 2 data sheets (sheet 1, sheet 2) with multiple columns that I need to compare and find any items that are not on both sheets. Before I do this I have to "normalize" the data by creating a unique identifier that each sheet can match against. This requires concatenating several columns with certain conditions. First, there's a source column that will define the concatenate rules based on what's listed in the source. I want to use the column title headers instead of column letters, since the data is on different columns on both sheets. But for purposes of this post, I will use letters for simplicity. The below are my requirements:

    source 1 - Concatenate B1 + C1
    source 2 - Concatenate B1 + C1
    source 3 - Concatenate B1 + C1
    source 4 - Concatenate B1 + Mid (D1, 7,4) + Right (D1,1)
    source 5 - Concatenate B1 + D1 + E1

    This will create a unique identifer for each item that I then want to check against both sheets and have non matches as my output. They can be highlighted on same worksheet(s).

    After this point, I want to be able to enter text into a description cell based on different criteria.

    Is this a feasable macro? What other information is needed? I realize i may have to tweek this so no worries if not correct on first try.

    Thank You
    Last edited by tomqueens; 07-17-2012 at 11:52 AM.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Macro that concatenates data, compares against another sheet & can add text in a desc

    Please attach a sample file.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    07-16-2012
    Location
    NY, USA
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Macro that concatenates data, compares against another sheet & can add text in a desc

    Here is sample file. It is abridged, as real file is about 17,000 lines. Template.xlsx

  4. #4
    Registered User
    Join Date
    07-16-2012
    Location
    NY, USA
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Macro that concatenates data, compares against another sheet & can add text in a desc

    Noes on sample file:

    Source is in column B on "smart" tab.
    B1 is column header "Cusip" in G in smart tab
    C1 is Stock record trade ref in W in smart tab
    D1 is Operations trade ref in Y in smart tab
    E1 is settlement date in S in smart tab

+ 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.6.0 RC 1