# Removing duplicate numbers from columns

1. ## Removing duplicate numbers from columns

Howdy all, noob here.

And I have a simple enough problem but I cant seem to work it out...

I am trying to create a list of post codes for online store delivery shipping prices in a 0-50k radius, 50-100k radius & 100-150k radius. I have all the post codes in a 50k radius, a 100k radius and 150k radius in three seperate columns, but I cant find a simple way to remove the 100k radius post codes from the 150k radius, leaving only the 100-150k, and the 50k from the 100k, leaving on the 50-100k.

Does that make sense and is there anyone out there that can help?

2. ## Re: Removing duplicate numbers from columns

Hi Limelight and welcome to the forum,

I have an answer using some helper formulas and copy and paste. See the attached.
Remove dup Postal Codes in Radius.xlsx

Here is the reasoning. If you count all the postal codes in Col A and B, some will equal 2 because they are listed twice. You only want the ones that are listed once, IE only in the 100 and not in 50.
Same idea for the 150. Count how many codes equal the 150 codes in all columns. If it is only 1 it must be in 150 only.
Sort those columns by these helpers and copy only codes with a 1 for the count down to the answer.

Some smart guru will most like come up with VBA or a single formula but this is how I'd do your problem.

3. ## Re: Removing duplicate numbers from columns

Thanks Marvin, good thought process, but as the posts codes aren't in numerical order by distance from us. There are both low and high numbers in each of the 3 radius ranges.

The first sign this hasn't worked entirely, is there are no 2XXX codes in the 100-150 radius...when in actual fact there should be 6 (as there are 12 on the 150 minus the 6 in 100).

I might just have to sit here and remove the duplicates manually. Which is fine, until we want to alter the parameters and I have to do it manually all over again... and again.

4. ## Re: Removing duplicate numbers from columns

Here is a second method because this was a fun problem.

Remove Dup Postal Code by Radius 2.xlsx

Now I need to read why I got the problem wrong above. I think both answers above don't use the codes being in order for them to work.
Tell me where I went wrong... I simply removed the 50 from the 100 and then removed both 50 and 100 from the 150. That is what I think I did at least!

5. ## Re: Removing duplicate numbers from columns

Not sure where/why the first attempt went wrong...but it looks like you nailed it on the second go!

Thanks a bunch

6. ## Re: Removing duplicate numbers from columns

Hey Limelight,

I just checked my first answer with the second and the numbers are exactly the same but the sort on the 150 is a little different. The first answer just didn't sort the 150 numbers from small to large but all the codes are correct and there. You scared me, saying the answer was wrong. I think it is correct but just not sorted.
Can I get a B+ instead of an A for not sorting the 150 column??

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1