ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Select Case for Sorting / Grouping Columns (https://www.excelbanter.com/excel-programming/323890-select-case-sorting-grouping-columns.html)

Bettergains

Select Case for Sorting / Grouping Columns
 
Hello:
I have a worksheet that contains data in columns. Above the column headers
I am adding three category rows. The categories are independent of each
other--not subcats of the other two. I am placing labels in the row-cells
that assign the category value to the column. My objective is to
programmatically create views based on either of these 3 categories.
Something like this:

In this region (which is the entire worksheet), if Row 1 says X, y, z:
hide these columns, hide rows 2 & 3
If Row 2 says x, y, z: unhide all, then hide these columns, hide rows 1 & 3
Etc.

It seems this would be easy to do with a case select. I'm recording it
manually in the meantime.

This should be fun for anyone out there with the time~

Chip[_3_]

Select Case for Sorting / Grouping Columns
 
did you get this figured out yet?


Bettergains

Select Case for Sorting / Grouping Columns
 
Hi Chip: nope--haven't had any time to spend on it yet.

Also, to simplify and add clarity, this is what i will want to do:

Based on the values in any of R1-3C[any], unhide all columns; if necessary
hide rows 1-3; and hide column(s) a, b, c (or any of the gazillion columns).

Footnote: if i can do this with Rows 1-3 hidden, that would be good.
Otherwise will add in the code to unhide them at the beginning of the
routine.

I know it's a relatively simple thing to do....just am very rusty on
non-recorded vba such as Case Selects.

"Chip" wrote:

did you get this figured out yet?




All times are GMT +1. The time now is 07:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com