Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hiding columns based upon a value (or vice versa)
How do I do VB to read a row then act on the relevant columns.
Say in row 6 I have 3 different variants, A B & C. If user pushes button A I only want all the columns with A in row 3 displayed. How do I do this? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hiding columns based upon a value (or vice versa)
Private Sub ButtonA_Click()
Dim cnt as long Dim lCol as Long 'Last Column Rows(3).EntireColumn.Hidden = False lCol = Cells(3,Columns.Count).End(xlToLeft).Column For cnt = 1 to lCol If Cells(3, cnt) < "A" Then Columns(cnt).Hidden = True Next End Sub -- Charles Chickering "A good example is twice the value of good advice." "Matthew Balch" wrote: How do I do VB to read a row then act on the relevant columns. Say in row 6 I have 3 different variants, A B & C. If user pushes button A I only want all the columns with A in row 3 displayed. How do I do this? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
If Hours 0, If Volume <= 0,(and vice-versa) then.... | Excel Worksheet Functions | |||
Possible to "rotate" range of cells so columns are rows and vice versa? | New Users to Excel | |||
I want columns of worksheet to become rows and vice-versa. | Excel Worksheet Functions | |||
Formula to convert/transpose columns to rows (and vice versa) | Excel Worksheet Functions | |||
Can I rotate excel sheets so columns are rows & vice-versa (i.e.. | Excel Discussion (Misc queries) |