PC Review


Reply
Thread Tools Rate Thread

Adding "button" to click to sort updated data?

 
 
FISH
Guest
Posts: n/a
 
      10th Sep 2007
I'm using Excel 2003 and need to add a button that users can click to sort
new data. Once a row has been updated with new data, I want the users to
simply be able to click this "button" in order to sort the new data in
descending order.


I have several different sets of data that I want to add these "buttons" to.
One for example is found between rows R5-R16. I have results from each row's
data in column R. I then users to be able to simply click this new "button"
to sort those results.

How can I do this?

Thanks in advance for any help !!!


 
Reply With Quote
 
 
 
 
L. Howard Kittle
Guest
Posts: n/a
 
      10th Sep 2007
Turn on the Macro Recorder and manually do a sort the way you want the
button click to. Stop recording and assign that macro to the button. You
may want to rename it to something more meaning full than Macro1()

HTH
Regards,
Howard

"FISH" <(E-Mail Removed)> wrote in message
news:ayiFi.53323$(E-Mail Removed)...
> I'm using Excel 2003 and need to add a button that users can click to sort
> new data. Once a row has been updated with new data, I want the users to
> simply be able to click this "button" in order to sort the new data in
> descending order.
>
>
> I have several different sets of data that I want to add these "buttons"
> to. One for example is found between rows R5-R16. I have results from each
> row's data in column R. I then users to be able to simply click this new
> "button" to sort those results.
>
> How can I do this?
>
> Thanks in advance for any help !!!
>



 
Reply With Quote
 
FISH
Guest
Posts: n/a
 
      10th Sep 2007
Thanks, but how do I assign the macro to the button?

I assume I add a command button and then assign this newly recorded macro to
it, but not sure how to do that?


Is there also a way to simply assign this newly recorded macro to a specific
cell instead of a button? I would actually prefer to just add this macro to
a cell for users to click on. That way I wouldn't have to create the buttons
one by one and make sure they fit exactly in the cell, look the right way,
etc...(I'm new to all this really).


Thanks again for the help.



"L. Howard Kittle" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Turn on the Macro Recorder and manually do a sort the way you want the
> button click to. Stop recording and assign that macro to the button. You
> may want to rename it to something more meaning full than Macro1()
>
> HTH
> Regards,
> Howard
>
> "FISH" <(E-Mail Removed)> wrote in message
> news:ayiFi.53323$(E-Mail Removed)...
>> I'm using Excel 2003 and need to add a button that users can click to
>> sort new data. Once a row has been updated with new data, I want the
>> users to simply be able to click this "button" in order to sort the new
>> data in descending order.
>>
>>
>> I have several different sets of data that I want to add these "buttons"
>> to. One for example is found between rows R5-R16. I have results from
>> each row's data in column R. I then users to be able to simply click this
>> new "button" to sort those results.
>>
>> How can I do this?
>>
>> Thanks in advance for any help !!!
>>

>
>



 
Reply With Quote
 
Roger Govier
Guest
Posts: n/a
 
      10th Sep 2007
Hi

You might want to take a look at (and download the sample file) the method
created by Dave Peterson using invisible rectangles.

You will find it at
http://www.contextures.com/xlSort02.html

--
Regards
Roger Govier



"FISH" <(E-Mail Removed)> wrote in message
news:ayiFi.53323$(E-Mail Removed)...
> I'm using Excel 2003 and need to add a button that users can click to sort
> new data. Once a row has been updated with new data, I want the users to
> simply be able to click this "button" in order to sort the new data in
> descending order.
>
>
> I have several different sets of data that I want to add these "buttons"
> to. One for example is found between rows R5-R16. I have results from each
> row's data in column R. I then users to be able to simply click this new
> "button" to sort those results.
>
> How can I do this?
>
> Thanks in advance for any help !!!
>



 
Reply With Quote
 
L. Howard Kittle
Guest
Posts: n/a
 
      11th Sep 2007
I'd use a button from the Forms Tool bar. Right click on the main tool bar
and check Forms. There is a button icon which you click on and move the
cursor to the worksheet and left click and hold as you drag to the right and
down. Release once you get to the size you like.

You can make your button and in the process it will give you an option to
Record Macro and it will be assigned to the button. Or you can right click
on a finished button and select Assign Macro.

Also once you have a button made you can right click on it and Copy. Select
a cell where you want a button, right click and then Paste. Select another
cell, right click again and Paste. And right click the buttons to Edit etc.

Roger's suggestion may be a bit confusing for a beginner. Once you've made
a few buttons it really is pretty easy.

HTH
Regards,
Howard

"FISH" <(E-Mail Removed)> wrote in message
news:i%iFi.53326$(E-Mail Removed)...
> Thanks, but how do I assign the macro to the button?
>
> I assume I add a command button and then assign this newly recorded macro
> to it, but not sure how to do that?
>
>
> Is there also a way to simply assign this newly recorded macro to a
> specific cell instead of a button? I would actually prefer to just add
> this macro to a cell for users to click on. That way I wouldn't have to
> create the buttons one by one and make sure they fit exactly in the cell,
> look the right way, etc...(I'm new to all this really).
>
>
> Thanks again for the help.
>
>
>
> "L. Howard Kittle" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Turn on the Macro Recorder and manually do a sort the way you want the
>> button click to. Stop recording and assign that macro to the button.
>> You may want to rename it to something more meaning full than Macro1()
>>
>> HTH
>> Regards,
>> Howard
>>
>> "FISH" <(E-Mail Removed)> wrote in message
>> news:ayiFi.53323$(E-Mail Removed)...
>>> I'm using Excel 2003 and need to add a button that users can click to
>>> sort new data. Once a row has been updated with new data, I want the
>>> users to simply be able to click this "button" in order to sort the new
>>> data in descending order.
>>>
>>>
>>> I have several different sets of data that I want to add these "buttons"
>>> to. One for example is found between rows R5-R16. I have results from
>>> each row's data in column R. I then users to be able to simply click
>>> this new "button" to sort those results.
>>>
>>> How can I do this?
>>>
>>> Thanks in advance for any help !!!
>>>

>>
>>

>
>



 
Reply With Quote
 
FISH
Guest
Posts: n/a
 
      11th Sep 2007
Thanks for the help so far.

I was able to do what you suggested, but ran into a problem with the macro
when things change in my spreadsheet.

I simply recorded the new macro and assigned it to the button as you
suggested, but it gets all messed up when I have to add rows or delete rows
within the section the macro is sorting.

For example:
One of the buttons with a macro assigned to it was set to sort column R from
rows 6-23 and works well as the spreadsheet is now. But, if I delete rows
8,9 and 10 and click the button the macro is assigned to, things get all
messed up. It appears to still sort rows 6-23 even though some of the rows
have been deleted...so now that I have deleted 3 rows, Excel is now sorting
3 more rows (the rows that were 24,25,and 26).





"L. Howard Kittle" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I'd use a button from the Forms Tool bar. Right click on the main tool
> bar and check Forms. There is a button icon which you click on and move
> the cursor to the worksheet and left click and hold as you drag to the
> right and down. Release once you get to the size you like.
>
> You can make your button and in the process it will give you an option to
> Record Macro and it will be assigned to the button. Or you can right
> click on a finished button and select Assign Macro.
>
> Also once you have a button made you can right click on it and Copy.
> Select a cell where you want a button, right click and then Paste. Select
> another cell, right click again and Paste. And right click the buttons to
> Edit etc.
>
> Roger's suggestion may be a bit confusing for a beginner. Once you've
> made a few buttons it really is pretty easy.
>
> HTH
> Regards,
> Howard
>
> "FISH" <(E-Mail Removed)> wrote in message
> news:i%iFi.53326$(E-Mail Removed)...
>> Thanks, but how do I assign the macro to the button?
>>
>> I assume I add a command button and then assign this newly recorded macro
>> to it, but not sure how to do that?
>>
>>
>> Is there also a way to simply assign this newly recorded macro to a
>> specific cell instead of a button? I would actually prefer to just add
>> this macro to a cell for users to click on. That way I wouldn't have to
>> create the buttons one by one and make sure they fit exactly in the cell,
>> look the right way, etc...(I'm new to all this really).
>>
>>
>> Thanks again for the help.
>>
>>
>>
>> "L. Howard Kittle" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> Turn on the Macro Recorder and manually do a sort the way you want the
>>> button click to. Stop recording and assign that macro to the button.
>>> You may want to rename it to something more meaning full than Macro1()
>>>
>>> HTH
>>> Regards,
>>> Howard
>>>
>>> "FISH" <(E-Mail Removed)> wrote in message
>>> news:ayiFi.53323$(E-Mail Removed)...
>>>> I'm using Excel 2003 and need to add a button that users can click to
>>>> sort new data. Once a row has been updated with new data, I want the
>>>> users to simply be able to click this "button" in order to sort the new
>>>> data in descending order.
>>>>
>>>>
>>>> I have several different sets of data that I want to add these
>>>> "buttons" to. One for example is found between rows R5-R16. I have
>>>> results from each row's data in column R. I then users to be able to
>>>> simply click this new "button" to sort those results.
>>>>
>>>> How can I do this?
>>>>
>>>> Thanks in advance for any help !!!
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
L. Howard Kittle
Guest
Posts: n/a
 
      11th Sep 2007
I see what you are up against. Probably have to set a range and then sort
the range, which is into vb code. You probably don't want or don't know how
to do that and I would have trouble telling you via e-mails.

I will be glad to look at a example workbook and try for a solution if you
want. Include your data layout and exactly what you want to happen and
where you want it to happen.

Regards,
Howard
(E-Mail Removed)


"FISH" <(E-Mail Removed)> wrote in message
news:CnzFi.26373$(E-Mail Removed)...
> Thanks for the help so far.
>
> I was able to do what you suggested, but ran into a problem with the macro
> when things change in my spreadsheet.
>
> I simply recorded the new macro and assigned it to the button as you
> suggested, but it gets all messed up when I have to add rows or delete
> rows within the section the macro is sorting.
>
> For example:
> One of the buttons with a macro assigned to it was set to sort column R
> from rows 6-23 and works well as the spreadsheet is now. But, if I delete
> rows 8,9 and 10 and click the button the macro is assigned to, things get
> all messed up. It appears to still sort rows 6-23 even though some of the
> rows have been deleted...so now that I have deleted 3 rows, Excel is now
> sorting 3 more rows (the rows that were 24,25,and 26).
>
>
>
>
>
> "L. Howard Kittle" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> I'd use a button from the Forms Tool bar. Right click on the main tool
>> bar and check Forms. There is a button icon which you click on and move
>> the cursor to the worksheet and left click and hold as you drag to the
>> right and down. Release once you get to the size you like.
>>
>> You can make your button and in the process it will give you an option to
>> Record Macro and it will be assigned to the button. Or you can right
>> click on a finished button and select Assign Macro.
>>
>> Also once you have a button made you can right click on it and Copy.
>> Select a cell where you want a button, right click and then Paste. Select
>> another cell, right click again and Paste. And right click the buttons
>> to Edit etc.
>>
>> Roger's suggestion may be a bit confusing for a beginner. Once you've
>> made a few buttons it really is pretty easy.
>>
>> HTH
>> Regards,
>> Howard
>>
>> "FISH" <(E-Mail Removed)> wrote in message
>> news:i%iFi.53326$(E-Mail Removed)...
>>> Thanks, but how do I assign the macro to the button?
>>>
>>> I assume I add a command button and then assign this newly recorded
>>> macro to it, but not sure how to do that?
>>>
>>>
>>> Is there also a way to simply assign this newly recorded macro to a
>>> specific cell instead of a button? I would actually prefer to just add
>>> this macro to a cell for users to click on. That way I wouldn't have to
>>> create the buttons one by one and make sure they fit exactly in the
>>> cell, look the right way, etc...(I'm new to all this really).
>>>
>>>
>>> Thanks again for the help.
>>>
>>>
>>>
>>> "L. Howard Kittle" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>> Turn on the Macro Recorder and manually do a sort the way you want the
>>>> button click to. Stop recording and assign that macro to the button.
>>>> You may want to rename it to something more meaning full than Macro1()
>>>>
>>>> HTH
>>>> Regards,
>>>> Howard
>>>>
>>>> "FISH" <(E-Mail Removed)> wrote in message
>>>> news:ayiFi.53323$(E-Mail Removed)...
>>>>> I'm using Excel 2003 and need to add a button that users can click to
>>>>> sort new data. Once a row has been updated with new data, I want the
>>>>> users to simply be able to click this "button" in order to sort the
>>>>> new data in descending order.
>>>>>
>>>>>
>>>>> I have several different sets of data that I want to add these
>>>>> "buttons" to. One for example is found between rows R5-R16. I have
>>>>> results from each row's data in column R. I then users to be able to
>>>>> simply click this new "button" to sort those results.
>>>>>
>>>>> How can I do this?
>>>>>
>>>>> Thanks in advance for any help !!!
>>>>>
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding both a "click" url and a "view" url to a text link dgco Microsoft Frontpage 4 10th May 2009 09:26 PM
Missing sort ascending or descending when go into "data" "sort"? Jason Microsoft Excel Misc 5 17th Sep 2008 11:57 PM
"Save Record" button not working after adding "Edit" button. Viken Karaguesian Microsoft Access 2 31st May 2006 02:30 AM
how do I sort contacts by last name when I click the "To" button =?Utf-8?B?R2lubmEgRGVhbg==?= Microsoft Outlook Contacts 3 1st Sep 2005 01:42 AM
UPDATED: Help! Error Adding Systems To Domain "Not Enough Storage..." Steven Caljkusich Microsoft Windows 2000 Active Directory 2 29th Sep 2003 10:30 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:25 AM.