Sort post code prefix into north and south using COMMAND BUTTON

charliew

Board Regular
Joined
Feb 20, 2018
Messages
71
Office Version
  1. 365
Platform
  1. Windows
Hello everyone,

I have a question that i'm not sure can be done so thought i would ask the experts.

A bit of context, i am working with my transport manager to aid him splitting his jobs into north and south of the country so he can schedule that accordingly...a report will be exported off our CRM and from there the data manipulated slightly.

I have a list of post code prefixes already in North/South column in a separate sheet and i've extracted the prefix from the main data set in a helper column.

What i had imagined is a command button that once clicked will sort the data and put all north postcodes highlighted blue (for example) at the top, and the south highlighted yellow underneath...

I've had a bit of a play with range.sort but it just wont do it...and i can't figure out how to get it to sort all the columns and not just the one with the postcode in it.

Any help is greatly appreciated.

Thank you :)
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Can you post a sample of your data along with some of the prefixes you have on the other sheet.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,333
Members
452,636
Latest member
laura12345

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