Automatically Sort a Row Left to Right after clicking on a cell in that row

kt2go

New Member
Joined
Apr 4, 2014
Messages
1
Hi Excel Gurus,
This is my first post on a forum so I hope to provide enough info to get some assistance. I have a large table (A1:FL3259) and am trying to figure out how to automatically sort a portion of the table (Column Y:Column FL) when someone clicks on a cell in a given row. For example when a user clicks on cell B3, the table Y1:FL3259 would sort the columns (Y-FL) in descending order left to right based on the table values in Row 3. The user then clicks on B4 and the entire table autosorts again based on the table values in Row 4 etc. There are many blank values in the cells depending on the specific row, but I think those blanks should go to the very right when the sort occurs. I would like the click on a cell to initiate the code as opposed to running the macro each time so it will be relatively invisible for the non-excel savvy user. Any help would be appreciated.

Thanks,
Kyle
 

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,221,418
Messages
6,159,790
Members
451,589
Latest member
Harold14

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