Finding Changes and New Additions to Dataset

Esscaster

New Member
Joined
Aug 7, 2013
Messages
14
Hi All,
New to forum and I guess an intermediate Excel user, never coded and still don't know how to use VLookup although good with Pivots, sorting, and mathematical formulas, etc.

Anyway, wondering how to compare two data sets. They are taken from the same system and contain the same headers and types of information, but they are taken in different points in time in which new entries are added and information in any given field can be changed.

Looking for a way to find these new entries as well as any entries that have any changes to any of the fields.

For example:

if data set A looks like this

1. A Red
2. B orange
3. C yellow
4. D green
5. E blue

and data set B looks like this:

1. A Red
2. B orange
3. C yellow
4. D violet (changed)
5. E blue
6. F (new) Indigo

... where row 6 is new and the entry for cell 4b has changed from green to violet.

Looking a way to easily flag new entries as well as find changes. The datasets I work with have a few hundred entries and about 20 columns.

Thanks in advance for help!
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Hi Ess
For your sample data one way to do (there are many) would be using Lookup

Hoja2

*ABCDEF
KeyValue*KeyValueFlag
ARed*ARed*
Borange*Borange*
Cyellow*Cyellow*
Dgreen*DvioletChanged
Eblue*Eblue*
***FIndigoNew

<tbody>
[TD="bgcolor: #cacaca, align: center"]1[/TD]

[TD="bgcolor: #cacaca, align: center"]2[/TD]

[TD="bgcolor: #cacaca, align: center"]3[/TD]

[TD="bgcolor: #cacaca, align: center"]4[/TD]

[TD="bgcolor: #cacaca, align: center"]5[/TD]

[TD="bgcolor: #cacaca, align: center"]6[/TD]

[TD="bgcolor: #cacaca, align: center"]7[/TD]

</tbody>

Excel tables to the web >> Excel Jeanie HTML 4

F2 is =IF(IFERROR(VLOOKUP(D2,$A$2:$B$6,2,0),-999)=-999,"New",IF(VLOOKUP(D2,$A$2:$B$6,2,0)=E2,"","Changed"))

Cheers
Sergio
 
Upvote 0
If both worksheets are in the exact same order and same format you can just make the first cell equal to the second. This will return either TRUE/FALSE. I make the FALSE red color to show the different.

=Sheet1!A1=Sheet2!A1
 
Upvote 0
Welcome to the Mr. Excel Message Board!

I would do a combination of an INDEX/MATCH along with IF(ISNA and IF(ISERR

The index match would be something along the lines of:

Code:
=INDEX($B$2:$B$6,MATCH(D2,IF($B$2:$B$6=E2,$A$2:$A$6),0))

Since you want to look up multiple values, it will return the values in B if it finds them. If if finds part of the value but not the other then it will return an #N/A, so we throw in a IF(ISNA

Code:
=IF(ISNA(INDEX($B$2:$B$6,MATCH(D2,IF($B$2:$B$6=E2,$A$2:$A$6),0))),"Value Changed",INDEX($B$2:$B$6,MATCH(D2,IF($B$2:$B$6=E2,$A$2:$A$6),0)))

This will let you know that a Value has changed...

Lastly, if it does not find the values, then it will throw out an #VALUE... so now we have to do a check for that, with IF(ISERR (which excludes #N/A)...

Code:
=IF(ISNA(INDEX($B$2:$B$6,MATCH(D2,IF($B$2:$B$6=E2,$A$2:$A$6),0))),"Value Changed",IF(ISERR(INDEX($B$2:$B$6,MATCH(D2,IF($B$2:$B$6=E2,$A$2:$A$6),0))),"New Values",INDEX($B$2:$B$6,MATCH(D2,IF($B$2:$B$6=E2,$A$2:$A$6),0))))

I know it looks like a lot, but the IFs make it redundant... someone else might come up with something more elegant, but that should get the job done!

Excel_Index_Match.png
 
Upvote 0
Welcome to the Mr. Excel Message Board!

I would do a combination of an INDEX/MATCH along with IF(ISNA and IF(ISERR

The index match would be something along the lines of:

Code:
=INDEX($B$2:$B$6,MATCH(D2,IF($B$2:$B$6=E2,$A$2:$A$6),0))

Since you want to look up multiple values, it will return the values in B if it finds them. If if finds part of the value but not the other then it will return an #N/A, so we throw in a IF(ISNA

Code:
=IF(ISNA(INDEX($B$2:$B$6,MATCH(D2,IF($B$2:$B$6=E2,$A$2:$A$6),0))),"Value Changed",INDEX($B$2:$B$6,MATCH(D2,IF($B$2:$B$6=E2,$A$2:$A$6),0)))

This will let you know that a Value has changed...

Lastly, if it does not find the values, then it will throw out an #VALUE... so now we have to do a check for that, with IF(ISERR (which excludes #N/A)...

Code:
=IF(ISNA(INDEX($B$2:$B$6,MATCH(D2,IF($B$2:$B$6=E2,$A$2:$A$6),0))),"Value Changed",IF(ISERR(INDEX($B$2:$B$6,MATCH(D2,IF($B$2:$B$6=E2,$A$2:$A$6),0))),"New Values",INDEX($B$2:$B$6,MATCH(D2,IF($B$2:$B$6=E2,$A$2:$A$6),0))))

I know it looks like a lot, but the IFs make it redundant... someone else might come up with something more elegant, but that should get the job done!

Excel_Index_Match.png

Thanks I'll give that a go
 
Upvote 0
Used countif successfully to find new entries. Was a lot easier than I thought, have an idea with countif with finding changes...
 
Upvote 0

Forum statistics

Threads
1,223,714
Messages
6,174,052
Members
452,542
Latest member
Bricklin

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