How to compare two lists to identify what's new and allow for blank cells?

rizzo93

Active Member
Joined
Jan 22, 2015
Messages
301
Office Version
  1. 365
I have two similarly formatted lists on different worksheets in the same workbook.

List A is my master list. List B, which changes weekly, has some values that exist on List A along with completely new values.

Each list has about 2,300 rows. I must compare these two lists and find the new values on List B. Ordinarily, I could find the changes if the data on every row had a value across multiple columns. But these lists are like the example below:

List A

Grandparent
Parent
Child
Region 1
Department 1
apple
orange
mickey
Minnie
Department 2
clark
bruce
mary
louise
Department 3
george
rick
sally
Region 2
Department 4
jojo
bob
Robert

<tbody>
</tbody>


List B

Grandparent
Parent
Child
Region 1
Department 1
apple
orange
mickey
Minnie
cisco
david
Department 2
clark
bruce
mary
louise
roger
stephen
Department 3
jojo
bob
Robert
marcus

<tbody>
</tbody>

The names in red are the new values that I need to identify, but also need to know the relationship they have with Region 1 and the three Departments. So if I find that "roger" has been added, I must also know that he's under Department 2, which is under Region 1.

I welcome any input to help me figure this puzzle out. Thanks. :)
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Why not just fill the details down for all rows.
Ctrl G > Special > Blanks > Ok > enter =A1 (or whatever is above the active cell) > Ctrl Enter
 
Upvote 0
If you fill the blank with department and region as suggested by Fluff, the solution will be simpler.

If you want to keep the table format as it is, try this one.

Copy the first table from Column A to C
Copy the second table from E to G
Enter the following formula into H2 and copy it down

=IF(ISNA(VLOOKUP(G2,C:C,1,FALSE)),"New","")

Enter the following array formula into I2 by pressing Control + Shift + Enter and copy it down

=IF(H2="","",INDEX($F$2:$F$17,MATCH(VLOOKUP(ROW(),IF($F$2:$F$17<>"",ROW($F$2:$F$16),""),1,TRUE),ROW($F$2:$F$17),0)))


Enter the following array formula into J2 by pressing Control + Shift + Enter and copy it down

=IF(H2="","",INDEX($E$2:$E$17,MATCH(VLOOKUP(ROW(),IF($E$2:$E$17<>"",ROW($E$2:$E$16),""),1,TRUE),ROW($E$2:$E$17),0)))

Let me know how you go.

Kind regards

Saba
 
Upvote 0
Thanks for the feedback, Fluff and Saba. :)

The structure I used in my example was over-simplified, so as weird as it may sound, filling in the cells is more complicated than it seems. There are a few reasons for this:

  1. Cells like Region 1 are a merged cell.
  2. Beneath that merged cell are another couple of single cells with text in them. Then another merged cell comes next for Region 2 and so on. Same thing for the column for Department 1, 2, etc.
  3. Even if 1 and 2 above did not exist or even if I selected the entire column to do an unmerge, I'd still be looking at manually going through approximately 2,300 rows to fill in the data. Even using Ctrl-D for a specific group of cells would be time-consuming. :eek:

I was thinking that helper columns may be of use in this situation. Maybe checking to see when a cell has a new value, then repeating it further down until a new one comes along. Not exactly sure if that's possible, but then I'd use those columns to do my comparison with.

Sorry for any confusion. I hope this clarifies things.
 
Upvote 0
I modified the formula to consider only Department and Region in the formula.

Enter the following array formula into I2 by pressing Control + Shift + Enter and copy it down

=IF(I2="","",INDEX($G$2:$G$17,MATCH(VLOOKUP(ROW(),IF(ISNUMBER(SEARCH("Department*",$G$2:$G$17)),ROW($G$2:$G$16),""),1,TRUE),ROW($G$2:$G$17),0)))

Enter the following array formula into J2 by pressing Control + Shift + Enter and copy it down

=IF(I2="","",INDEX($E$2:$E$17,MATCH(VLOOKUP(ROW(),IF(ISNUMBER(SEARCH("Region*",$E$2:$E$17)),ROW($E$2:$E$16),""),1,TRUE),ROW($E$2:$E$17),0)))

I tested the formula with merged cells. It did not cause any problem.

Kind regards

Saba
 
Upvote 0

Forum statistics

Threads
1,215,425
Messages
6,124,824
Members
449,190
Latest member
rscraig11

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