Combo Box dropdown to list column headers and then sort by selection

qwerty1234

New Member
Joined
Dec 9, 2014
Messages
20
I have a protected workbook that I cannot allow other users to edit. However, there are several other people who require the information on the spreadsheet, which is why it is protected. Unfortunately, due to Excel failure's apparently, Excel will not allow the users to sort the different columns without unlocking those columns, which I cannot allow as it will give those users access to change the data.

I will be the first to admit that I'm not great with Macros. I tried to write a code that would allow a user to sort the sheet without unlocking the cells, but I don't know how to do it for all columns. Instead, I was thinking of using a combo box as a drop down to allow the users to sort the columns that way. The drop down would list the different column headers, and then the user can select which one they want, then ascending or descending, and a macro would do the sorting for them.

Is this an option? And is there someone who could help me with the coding? Or does someone have a code that would automatically unprotect the sheet, sort the column in question, and then reprotect the sheet without having to activate a macro (most of these user's no nothing about coding)? I know I'm not the first person to run into this issue.


This is the kind of data I'm looking at:
contractpart numberitem namequantitycostdue datesupplier
a1soup22.53/15/2015Costco
b2beef13.43/18/2015Big Y
c3bread33.13/11/2015Big Y
d4water723/29/2015Price Chopper
e5milk434/1/2015Stop N Shop
b2beef13.44/18/2015Big Y
b2beef13.43/18/2015Big Y
d4water725/1/2015Price Chopper
a1soup22.54/10/2015Costco

<colgroup><col width="108" span="7" style="width:81pt"> </colgroup><tbody>
</tbody>

So I can't have the users changing the part number, cost, due date, etc., but I want them to be able to sort by any of those columns.

Any help would be appreciated.
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Why not simply protect the sheet while allowing users to sort? It is an option in the Protect Sheet dialog...
 
Upvote 0
It doesn't do anything. If you protect the sheet, with the "sort" box checked, it still will not allow users to sort.
 
Upvote 0

Forum statistics

Threads
1,215,483
Messages
6,125,064
Members
449,206
Latest member
Healthydogs

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