+ Reply to Thread
Results 1 to 4 of 4

Compare characters in two columns

  1. #1
    Forum Contributor
    Join Date
    12-03-2009
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    184

    Compare characters in two columns

    Hello,
    I have 2 worksheets in two different workbooks (wb1 sh1 and wb2 sh1). I want to run a macro from a third workbook that compares the time stamp in Column A with both worksheets if matches then compare first 4 characters of column B wb1 sh1 with column B wb2 sh1. If they match then copy the last 3 characters from Column B wb2 sh1 to the end of the data in column B wb1 sh1 (append to existing characters). I need this to loop thru each row until empty. The example below is just a simple example so I cannot just copy one column to another. Any help would be appreciated. Also, I need to run a macro from a third workbook because to first 2 workbooks do not exist until other parsing code finishes.

    Thx
    E.


    Existing:
    Wb1 sh1 column A and B
    16:00:00 700E
    16:00:00 800G
    16:00:00 900H

    Wb2 sh1 column A and B
    16:00:00 700E(A)
    16:00:00 800G(B)
    16:00:00 900H(C)

    Results:
    wb1 sh1 column A and B
    16:00:00 700E(A)
    16:00:00 800G(B)
    16:00:00 900H(C)
    Last edited by enhydra; 12-02-2011 at 09:21 PM.

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

    Re: Compare characters in two columns

    You mean - just the brackets and the alphabet within needs to be appended right?
    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
    Forum Contributor
    Join Date
    12-03-2009
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: Compare characters in two columns

    That is correct.

  4. #4
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Compare characters in two columns

    Please post a sample workbook and the code you have managed to write this far.



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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