Sort data in rows and columns that is a mess

Sharid

Well-known Member
Joined
Apr 22, 2007
Messages
1,064
Office Version
  1. 2016
Platform
  1. Windows
I have a list of data, it come in a mess and it takes forever to sort out with filters. The data comes like this

ABC
10%JohnADD:1 My Address
10#Jane1 My Address
15%bob%ADD: 1 My Address
5#peter?ADD: 1 My Address
10ADD: 11 My Address#Joe
10#JaneADDS: 11 My Address
2peter#Steve
10ADDS:10 My Address#Steve

<tbody>
</tbody>

I need it to Keep All the rows

With "10" then
the rows with 10 + "#"
and then rows with 10,# + "ADD" or "ADDS" in them

The code is to then clears all the other rows and deletes all the BLANK and duplicate rows


Finally, It also needs to sort the names in Column B and Address in Column C. So the end result will look like this

End Result

ABC
ADD:1 My Address
10#Jane
10#JaneADD: 11 My Address
10#JoeADD: 11 My Address
10#Steve
10#SteveADDS:10 My Address

<tbody>
</tbody>

The code has ignored row with 15 and 5 above as they did not have the number 10 in them even though they had "#" + "ADD"

Can anyone please help.
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

Forum statistics

Threads
1,214,653
Messages
6,120,750
Members
448,989
Latest member
mariah3

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