Create a MACRO TO SORT by selected column, then return the first column in a range

brooksc29

Active Member
Joined
Jul 25, 2010
Messages
333
In cell A1, there is a drop down box that has text referring to certain types of positions in baseball in the named range AVAILABLE.

In column A below there is a list of names returned from the range AVAILABLE based on the position selected in A1. Right now I am using INDEX/MATCH/OFFSET to find the name in the range based on manually sorting the range AVAILABLE by position (column C), then by a statistic that measures production (column E).

In cell U1, there is a drop down box that has text referring to certain types of statistics in the range PITCH2016.

I'd like to write a formula or macro that will read the text in cell U1, sort the range PITCH 2016 (by the column starting with the text in U1) and also sort the range AVAILABLE by the same text selected in U1 (and also keep the sort of the range AVAILABLE by position as the first layer).

Would this be done easier by writing one large macro that reads the selected text in U1, or by creating buttons linked to individual macros that would sort each range by category, one at a time?

I can show my work so far if needed but it's a 2.35 MB document.

Any ideas?
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Forum statistics

Threads
1,214,590
Messages
6,120,423
Members
448,961
Latest member
nzskater

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