Find Differences Between Worksheets and Export to Third Worksheet

samwell47

New Member
Joined
Oct 6, 2017
Messages
2
Hello forums,

I have a dream of an Excel macro or tool that would make my job infinitely easier, but attempting to cobble it together on my own from Google and forum posts has not proved fruitful.

One of my job duties is to take reports that are exported nightly and compare them to determine what, if anything has changed. My predecessor did this manually. My current method involves pasting the data side by side, and using conditional formatting and highlighting to identify changes - a little more automated, but... Since there are additions and deletions from one day to the next, I have to go through the report and manually add spaces in one side or the other when an entry has been added or deleted, so the conditional formatting can check the rows 1:1 (my "code" is just three columns of =IF(this=that,"Y","N") statements).

This, obviously, sucks to do by hand and wastes a lot of time, and I know there's got to be an easier way.

My data looks like this (but each sheet is hundreds of rows long)

ABCDE
ART1011001John25
ART1011002Jane10
BIOL1011003Alex30
BIOL201L1004Ruth5

<tbody>
</tbody>

ABCDE
ART1011002Ford10
BIOL1011003Alex30
BIOL1051005Beth20
BIOL201L1004Ruth5
HIST3021006Quentin45

<tbody>
</tbody>

I'd love to find a piece of code or tool that could output this from an input of two sheets:

ABCDE
ART1011001John25
ART1011002Jane > Ford15
BIOL1051005Beth20
HIST3021006Quentin45

<tbody>
</tbody>

Where the red row appears in Sheet 1 but not 2 (deletion), the green rows appear in Sheet 2 but not Sheet 1 (addition), and the row with a value changed in column D or E is pasted in with the change in value noted.

Instead of me having to do this and waste half an hour every day:
lS31TDM.png


Any assistance would be infinitely appreciated. Thank you!
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
ART1011001John25ART1011001John25deleted
ART1011002Jane10ART1011002Jane10deleted
BIOL1011003Alex30BIOL1011003Alex30
BIOL201L1004Ruth5BIOL201L1004Ruth5
ART1011002Ford10ART1011002Ford10added
BIOL1011003Alex30BIOL1011003Alex30
BIOL1051005Beth20BIOL1051005Beth20added
BIOL201L1004Ruth5BIOL201L1004Ruth5
HIST3021006Quentin45HIST3021006Quentin45added
ART1011001John25
ART1011002Jane > Ford15#####
BIOL1051005Beth20
HIST3021006Quentin45by concatenating first
then checking top set against bottom set to find deletions
then checking bottom set against top set to find additions
I do not understand row marked #####
very easy to conditionally format top table red
if column J = deleted
similarly the bottom table green for new rows
I think your bottom table is wrong
and it should be
ART1011001John25red
ART1011002Jane10red
ART1011002Ford10green
BIOL1051005Beth20green
HIST3021006Quentin45green

<colgroup><col span="3"><col><col span="4"><col><col span="4"></colgroup><tbody>
</tbody>
 
Upvote 0
The bottom table is not "wrong." I guess I didn't make it clear what I needed (but that's a rude way to say you didn't get it, you know). The line with ID "1002" needs to indicate that it changed from Jane to Ford, not be repeated twice in the output as both an addition and deletion. I suppose I can run some secondary check on that output. Like, looking for duplicated of ID number and then outputting the change...

I guess I'll try that concatenation. I suppose it doesn't matter how kludgy the code of my macro looks as long as it gets me the right results in the end, right? I guess I'll mess with this for a while and see if I can get any further.

It''s really frustrating, though, to come in to a help forum and be told that my example of what I'm looking for is "wrong" just because you don't understand. I don't think I'll be returning to this particular website if I need more help on this topic.
 
Upvote 0
It is very hard to communicate by Email or forum. I clearly did not understand what you wanted. It is hard for a person who understands the scenario perfectly to give all the right info in their initial post. This is a very good forum with hundreds of knowledgeable people. I did not mean to tell you that your data was wrong, if we were talking face to face I would have asked "how is that value there derived". I sincerely hope you find a solution quickly.
 
Upvote 0

Forum statistics

Threads
1,215,350
Messages
6,124,439
Members
449,160
Latest member
nikijon

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top