Sort varying length table by custom conditions

dewy0823

New Member
Joined
Jun 6, 2024
Messages
4
Office Version
  1. 365
Platform
  1. Windows
My worksheet form is setup with 42 columns and 100 rows. The number of rows containing data varies since once the item (row) is complete, it will be archived to another worksheet where the row will be copied, then the original deleted. I have Filters turned on and they work as expected. However, I want to be able to Sort the varying length table by different conditions. Sort1 will sort starting with col. A then by D and ignore blanks. I need the sort to build on the previous sort within Sort1. That is sort on col. A will not be lost when sort on col. B is complete. Sort2 will sort by col. D the A. Sort3 will have other sort conditions depending on how I want to read the data. Each of the sorts must be activated manually from buttons. I know how to create buttons and assign a macro. If I record a macro, it requires I select the entire 42x100 table, which not so desirable because it's possible the table may be expanded with another 100 rows that are formatted and coded the same. I'd like the sort to look for the last cell containing data or the first blank cell and the sort as needed. Not sure how to do this. Thx.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Forum statistics

Threads
1,224,755
Messages
6,180,770
Members
452,996
Latest member
nelsonsix66

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