Find records where range has changed - Excel

sncb

Board Regular
Joined
Mar 17, 2011
Messages
145
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Hi there,

Not sure if this would be the right place to ask but hopefully I get a solution.

I have orders (hundreds of lines) in excel where based on a certain postal code range the salesperson was assigned his/her margin. The issue I face is that the zip code range has changed and I need to extract only those order records where the new zip code of the Salesperson falls outside the existing range.

1680178840180.png


So in my list of orders, I need to identify the rows shown in yellow(highlight, extract, or any other option), as these are now in the new range. Any idea how I should go about this?

1680178909779.png
 

Attachments

  • 1680178795262.png
    1680178795262.png
    11.2 KB · Views: 1

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
You should just be able to do Conditional Formatting, highlighting all rows where column K is not equal to column L.
That Conditional Formatting Formula would look like:
Excel Formula:
=$K2<>$L2
 
Upvote 0
Thanks Joe,

Maybe I should have been more clear. The only info I have is this below. I was using col K and L to indicate my expected rows.

1680180217807.png
 
Upvote 0
As long as there are no gaps in your zip codes, and your zip code lookup tables are sorted in order by the first column, you can get the values in columns K and L using VLOOKUP function with the 4th argument ("approximate match") set to "TRUE". See: Excel VLOOKUP Function Examples and Troubleshoot Problems

So, there are two ways would go about it.
You could create two VLOOKUP formulas:
- column K: VLOOKUP using original (old) lookup table
- column L: VLOOKUP using new lookup table

And then do the Conditional Formatting I explained in my first reply.

Or, you could skip the "helper" columns and do the VLOOKUP formulas right in the Conditional Formatting formula, i.e.
Excel Formula:
=VLOOKUP(old)<>VLOOKUP(new)
 
Upvote 1
Thank you Joe. I will try this out tomorrow and let you know.
 
Upvote 0
Hit a bump. Just realized that the new zip code range has gaps and not continuous. The data looks more like this. Any suggestions?

1680523614203.png
 
Upvote 0
I would probably create "dummy" recrods to fill the gaps. If you do that, then you can still probably use the same methodology. i.e.
1680525026191.png

Otherwise, you are going to need a much more complex formula or possibly have to use VBA.
 
Upvote 0
Solution
Brilliant idea. I'll try that and report back. Thanks
 
Upvote 0
Hi Joe,

Just wanted to give you feedback that your solution worked spot on. I did have to do some data crunching myself based on what I needed but your crucial input helped to think in the right direction and finally resolve the issue. So thanks a ton.
 
Upvote 0
You are welcome.
Glad I was able to assist.
 
Upvote 0

Forum statistics

Threads
1,218,193
Messages
6,141,026
Members
450,331
Latest member
Scott JBrown

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