PC Review


Reply
Thread Tools Rate Thread

Click-Sort Button: Dealing With Now-Irrelevant Subtotals?

 
 
PeteCresswell
Guest
Posts: n/a
 
      30th Apr 2007
I've been putting little buttons in the column headers of some of the
spreadsheets I create so the user can click the column header and have
the sheet sorted by values in that column.

Works pretty well.

But now the user wants that functionality on a sheet that may have
subtotals.

It works but, of course, the subtotals get blindly sorted depending on
the subtotal row headers as well as the "real" data in the same
columns - and now the user has a sheet that shows rows labeled as
subtotals, but whose amounts reflect some other range than what's
above them. It also pops "Circular Reference" errors periodically.

I guess I could somehow identify the subtotal lines and delete them
the first time the sort routine is invoked... but that would make the
subtotals sort of go "Poof!" before the user's eyes - with no
explaination.

Or maybe I could grey out the subtotal rows and change Font.Style to
something like StrikeThrough as part of the sort routine.

Anybody figured out a way to deal with this gracefully?

 
Reply With Quote
 
 
 
 
(PeteCresswell)
Guest
Posts: n/a
 
      1st May 2007
Per PeteCresswell:
>
>Anybody figured out a way to deal with this gracefully?


I wound up just deleting those rows - passing a couple of
locator/identifier parms to the VB code that created the routine
in the .XLS.

Only tricky part was preserving any border around the data area
if there happened tb a subtotal line at the bottom of said area.

If anybody cares, there's a downloadable sample of a .XLS at
www.wchs59.com/ClickSortSample.xls

Note that the center sheet doesn't have a border at the bottom to
begin with... it's not the click/sort routine that's losing it.
--
PeteCresswell
 
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
Sort by Ascending on button click Angelsnecropolis Microsoft Access Form Coding 0 4th Nov 2009 12:51 AM
Adding "button" to click to sort updated data? FISH Microsoft Excel Discussion 6 11th Sep 2007 09:09 PM
Can we change the SORT button when we click on Datagrid =?Utf-8?B?U3Vubnk=?= Microsoft Dot NET Framework Forms 0 6th Oct 2006 05:15 PM
How to fire both event button click and textchanged when button is click and text is changed Amy Microsoft ASP .NET 0 1st Jun 2006 03:33 PM
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


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:34 AM.