Click event sort ascending then descending
How about if you just look at the topmost cell and the bottommost cell of the
column that should be sorted.
If the top bottom, sort in descending order. If the bottom top, sort in
ascending order.
Ting wrote:
I have a macro that sorts ascending when first clicked. Is there a way to
sort descending automatically if same button clicked a second time. I tried
to set a global variable to track what was used last time, but received an
error. The only way I can think of is to write to a cell in the spreadsheet
the last sort state.
Am I on the right track?
--
Dave Peterson
|