Select Case for Sorting / Grouping Columns

G

Guest

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~
 
G

Guest

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.
 

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

Top