+ Reply to Thread
Results 1 to 2 of 2

Copy + paste of unequal rows after column comparison

  1. #1
    Registered User
    Join Date
    08-24-2019
    Location
    Germany
    MS-Off Ver
    Office 365
    Posts
    1

    Copy + paste of unequal rows after column comparison

    Hey guys,

    The macro below is supposed to compare two columns and, in case there is a difference in the two, copy the concerning row and paste it directly below marked in a different color.
    The macro as it is is able to recognize the differences in the columns and the copying of the unequal row also works as it should, except for one thing: the row is being pasted at the very end of the columns and not directly below the one with the difference.
    Example: if rows 15 and 43 are being compared and a difference is being found, the macro should copy row 15 and paste it directly below as row 16. Same for row 43, which should be copied and pasted as row 44.
    Hope, I was able to demonstrate the issue I have with the macro. As I am fairly new to programming, especially with VBA, I am having some difficulties with it and have already spent many hours solving this problem.
    I hope, someone is able to understand the issue and provide a solution or even an idea.

    Thanks.


    Please Login or Register  to view this content.
    Last edited by Pepe Le Mokko; 08-25-2019 at 02:49 AM.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Copy + paste of unequal rows after column comparison

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    I did it for you this time as you are new here. Take a moment to read our forum rules

+ 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. Replies: 1
    Last Post: 01-07-2019, 10:54 AM
  2. counting and naming unequal data in unequal length rows
    By faustfisher in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-30-2017, 07:28 AM
  3. VBA code to copy n rows of data and paste into every second column
    By frankbrett in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-19-2016, 03:30 PM
  4. Copy Paste Rows by Column Criteria
    By regularcat in forum Excel Formulas & Functions
    Replies: 35
    Last Post: 10-25-2014, 09:21 PM
  5. How to copy and paste into multiple rows within SAME column
    By kksf in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-26-2013, 06:10 PM
  6. Compare rows in column A and copy/paste if they are the same using a for next loop
    By Andrew C in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-07-2009, 01:26 PM
  7. Copy Column Data and Paste Into Rows
    By moongate in forum Excel General
    Replies: 3
    Last Post: 12-11-2008, 07:51 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