• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Macro for matching by shifting rows down and getting difference

kumarrajesh

New Member
Hi All,

Many thanks in advance for the help.

I am looking to write a small macro for a task that we do daily on huge data. The task is to compare two columns (A&B) match them and get difference of columns (C&D) in difference column.

If value in column ‘A’ is greater than value in column ‘C’, then shift down rows in column ‘A’ and vice versa, if value in column ‘A’ is less than value in column ‘C’ then shift down rows in column ‘C’.

After matching process is completed we have to get the difference of column ‘B’ and column ‘D’ in difference column.

Also what if data in columns ‘A’ and ‘C’ are alphanumeric values, still can be done.

For reference attached the sheet.

Regards,
Rajesh.
 

Attachments

  • Match.xlsx
    9.9 KB · Views: 6
Hi,

I have made macro as per your requirement, check the attached workbook and run the macro "rearrange".

Regards
Abdul Matheen
 

Attachments

  • Match.xlsm
    15.8 KB · Views: 6
Back
Top