Column changing

  • Thread starter Thread starter sby
  • Start date Start date
S

sby

Hi

This is a big ask but does anyone know how to data in one column to show
different data.
What I want is to have a column with data and at the bottom have a button
which when you press it changes the data to something different (ie: a hidden
column) and when you click it again it put the original data back.
I want this so I do not have to have more columns on a sheet.

Thanks

SBY
 
Hi

Take a look at the Group and Outline function.
Mark any number of columns that you wish >Data>Group and Outline>Group
Thos columns will now be hidden, and you will see a "+" sign inserted above
the column headers.
Clicking the + sign will make them visible again, and the sign will change
to -. Clicking the - sign will hide them again.
 
Thanks Roger

That works, but what I would like is for only one sheet to appear at a time.
I was thinking about using a button (spin or toggle). any ideas.

Regards


SBY
 
hi,
try this. it will hide one column while showing another and change the
button color and captions.
Private Sub CommandButton1_Click()
If Columns("C:C").Hidden = True Then
Columns("C:C").Hidden = False
CB1.BackColor = RGB(0, 0, 255)
'CB1.ForeColor =
CB1.Caption = "Numbers"
Columns("D:D").Hidden = True
Else
Columns("C:C").Hidden = True
Columns("D:D").Hidden = False
CB1.BackColor = RGB(245, 30, 5)
'CB1.ForeColor =
CB1.Caption = "Letters"
End If
End Sub

edit to fit your data.
regards
FSt1
 
Back
Top