Using Commandbutton for different ranges

W

WLMPilot

I have a worksheet with 12 months of budgets. Across the top are
commandbuttons, one for each month, that I use to have that month brought
into view. I also have two commandbuttons per each month that perform a
sort.
FYI: One sort is to sort by due date and the other button sorts by
separating income entries and expenses.

I was wondering if there was anyway to just have two sort commandbuttons at
the top and somehow they would know which month was being view, thus know the
cell ranges to address for the sort?

Thanks,
Les
 
J

JLGWhiz

Hi Les, You would have to have a way to tell the sort macro where to look
for the month and then have an algorithm set with either If ..Then or a Case
statement that says for month 1 sort this range, for month 2 sort that range,
etc. These things are really pretty dumb, but they are fast.
 

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

Choosing Active Cell 5
Problem w/ cell reference 2
Named Ranges 2
Erratic Behaviour of Buttons 3
Grouping of Categories 1
macro 1
Confusion Using Named Ranges 11
range selection for a sort on a excel db 2

Top