Macro to select cells with active data only across static number of columns but variable rows and then sort the selection

Maverick79

New Member
Joined
Jun 11, 2020
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hello all. Hoping you can help a newbie to macros :). I am trying to create a macro which will select and sort only the active cells in a table with headers across a set number of columns but with variable rows depending if there is any active data in the first cell of the row. I have tried to separate the steps and then combine by calling the next macro but run into errors. The first column should have no gaps in the list data, but the other columns may have blank cells. I want to select all columns based on number of rows with active data in first column and sort in ascending order by the last column (Month), but if month cell is blank this row should be last in sorted selection.

Order NumberChassisBrandMonth
8888888521345xyz1
9999999xyz
7777777854923abc8

Thanks in advance for your help!
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Forum statistics

Threads
1,214,646
Messages
6,120,716
Members
448,985
Latest member
chocbudda

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