sorting comma separated data

jamiedaka

New Member
Joined
Jan 23, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Please can anyone help an amateur?
I have a list of comma separated postcodes all in a cell.
I have a separate list of postcodes and want this list not to include duplicates from the first list.

I just cant work out how to do it.

the first list contains all the postcodes within 8 miles from a point
the second list contains all the postcodes within 12 miles from the same point.

i need to see the second list only contain postcodes between 8 and 12 miles - hopefully this makes sense?
thanks for any advice.
 

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.
I have a list of comma separated postcodes all in a cell.
That is one of the first mistakes that many people make. I would suggest rethinking your sheet layout before attempting to do anything with the data.

Two lists that have one postcode in each cell is easy to compare.
One list that is comma delimited in a single cell and another list that has individual postcodes in separate cells is not so easy but can be done.
Two comma delimited lists is a difficult task and can be error prone.

Another common mistake is merging cells. Merged cells are fine as long as you don't need to look at them with a formula, that's when things can start to get messy.
 
Upvote 0
Provide the following information.

1. Cell reference for cell containing comma separated data. e.g. "A1"
2. Range containing list of individual codes, e.G. "B1:B50"
3. If data is on separate sheets, specifiy sheet names and which contains which set of data.

We cannot see your worksheets, so you must provide information that allows us to know where each type data is located, refer to the worksheets and workbooks involved by name, if more than one of each.
 
Upvote 0
Odes your version of excel have the option under Data to convert Text to Columns, if yes select the cell containing the csv data convert to split out data into seperate columns, copy all the new columns, paste and paste special , transpose, now you should have a list to compare.
 
Upvote 0
Provide the following information.

1. Cell reference for cell containing comma separated data. e.g. "A1"
2. Range containing list of individual codes, e.G. "B1:B50"
3. If data is on separate sheets, specifiy sheet names and which contains which set of data.
One more question to add to JLGWhiz's list...

4. Is your data separated by just commas or is there a space after each comma?
 
Upvote 0
Thanks all - sorted now with your help.
Couldn't see the wood for the trees!
 
Upvote 0

Forum statistics

Threads
1,214,584
Messages
6,120,384
Members
448,956
Latest member
JPav

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