How to put a button on a cell and assign macro to it?

C

cimbom

Hi,

I would like to put a button on top of each column so that when I
click on the button, it will do the basic sort function. I would like
to sort each machine by first x (employees who know the job) second Y
(wants to be contacted) and third by seniority ( oldest to
newest) .
A B C D
E F G
1 NAME FED1 FED2 N-8 Contact? Seniority
Phone number
2 Brian x x
Y 8/23/04 234-5678
3 David x
N 5/6/00
4 Roger x x N
6/12/02
5 Jeff x
Y 5/21/01
6 Chad x Y
9/31/04
7 Serhan x x Y
3/15/02 213-2145
8 Garrett x
N 9/10/99
9 Liz x x
N 7/7/03
10 Tom x x
Y 4/3/00 324-6723


So, Fed 1 will basically look like this:

Tom x Y 4/3/00 324-6723
Serhan x Y 3/15/02 213-2145
Brian x Y 8/23/04 234-5678

I, also, would like to go back to the original list after the
sorting.

Thank you,
 
M

Mick

Hi,

I would like to put a button on top of each column so that when I
click on the button, it will do the basic sort function. I would like
to sort each machine by first x (employees who know the job) second Y
(wants to be contacted) and third by seniority ( oldest to
newest) .
     A               B            C         D
E                 F                   G
1 NAME      FED1      FED2      N-8    Contact?       Seniority
Phone number
2 Brian           x                         x
Y            8/23/04          234-5678
3 David                         x
N           5/6/00
4 Roger          x                         x              N
6/12/02
5 Jeff                            x
Y           5/21/01
6 Chad                         x                           Y
9/31/04
7 Serhan        x            x                           Y
3/15/02           213-2145
8 Garrett                      x
N           9/10/99
9  Liz              x                         x
N           7/7/03
10 Tom            x                         x
Y           4/3/00          324-6723

So, Fed 1 will basically look like this:

Tom      x         Y      4/3/00        324-6723
Serhan  x         Y      3/15/02      213-2145
Brian     x         Y      8/23/04      234-5678

I, also, would like to go back to the original list after the
sorting.

Thank you,

Record a macro that does all the sorts and assign it to a button from
the forms menu (can't put a bhutton on a column header so put it in
row A). Then record a second macro that clears the sort mode and
assign it to a second button.

Hope this helps
 
C

cimbom

Record a macro that does all the sorts and assign it to a button from
the forms menu (can't put a bhutton on a column header so put it in
row A). Then record a second macro that clears the sort mode and
assign it to a second button.

Hope this helps- Hide quoted text -

- Show quoted text -

Thanks for the help, but how can I put a button on a cell? Could you
be specific please? Thanks again
 
G

Gord Dibben

View>Toolbars>Forms

Select the button builder icon and draw your button where you wish.

Right-click and Assign Macro.


Gord Dibben MS Excel MVP
 
M

Mick

Thanks for the help, but how can I put a button on a cell? Could you
be specific please? Thanks again- Hide quoted text -

- Show quoted text -

Not sure what you been by put a button a cell. Do you mean link it to
a cell?
 

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

Top