Interactive Buttons

G

Guest

I want to create buttons that will re-sort on different columns in the
spreadsheet. Does anyone have an example of this? Is it a marco I would use
to create the button and the function behind it?
Thank you.
Mary
 
G

Guest

Roger and Dave,
You guys are my heroes! I will try the information you provided and let you
know if it works!
Thank you much!
Mary
 
G

Guest

Roger and Dave,
This works for only one column sort, each of sorts will need three columns.

Name - always
Number - always
and then by one of the following options
Period of Performance
Status
POC
Hmmmm - What do you think??? Not possible?
I appreciate your assistance and expertise with Excel issues very much.
Happy & Healthy Holidays!
Mary
 
D

Dave Peterson

I'd just click on the different headers.

Click on the name header, then the number header, then the period header (Or
maybe reverse the order).

If you really need separate macros, record the macros when you sort.

Then drop a few buttons from the forms toolbar on the worksheet. Assign each
button to a different macro.

========
I like the macro as-is. I think the way it works is more general--I can sort
any which way I want.

But you could modify this line:

myTable.Sort key1:=.Cells(myTable.Row, myColToSort), _
order1:=mySortOrder, _
header:=xlYes

to include the columns that should always be sorted.

myTable.Sort _
key1:=.Cells(myTable.Row, 1), order1:=mySortOrder, _
key2:=.Cells(myTable.Row, 2), order2:=mySortOrder, _
key3:=.Cells(myTable.Row, myColToSort), order3:=mySortOrder, _
header:=xlYes

(You'll have to change the column (I used 1 and 2) and you may even want to
remove the rectangles from the fields that shouldn't be sorted. Just right
click on that header cell and you'll "see" the invisible rectangle. Then hit
the delete key.)

(I still like to be able to sort as many ways as I like <vbg>.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Merging Workbooks 3
Sort Button 2
Macro to create Sort buttons 8
msgbox question 2
Can't delete buttons 3
filters for selective columns? 2
How to create a new page with a button? 3
Using Filter more than once 2

Top