D
Damil4real
If A56 is “Yes’, hide Column A58:A60.
How can I accomplish that?
Thanks!
How can I accomplish that?
Thanks!
Hi
You could cheat a bit by using Conditional Formatting and colouring the font
white if A56 is "Yes"
Reply if you need instructions
HTH
John
If A56 is “Yes’, hide Column A58:A60.
How can I accomplish that?
Thanks!
Hi
You could cheat a bit by using Conditional Formatting and colouring the
font
white if A56 is "Yes"
Reply if you need instructions
HTH
John
If A56 is “Yes’, hide Column A58:A60.
How can I accomplish that?
Thanks!
This one relies on a CHANGE made in cell B1. Hides if yes, unhides if
anything else
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$B$1" Then Exit Sub
Rows.Hidden = False
If UCase(Target) = "YES" Then Rows("58:60").Hidden = True
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
Thanks, John, but seems like I can't click on any other cell once that
code is in effect. it keeps updating itself and won't let me click on
another cell. I'm trying to create a form, and so I have to click on
other cells...etc.
How can I avoid that?
Thanks!- Hide quoted text -
- Show quoted text -
This one relies on a CHANGE made in cell B1. Hides if yes, unhides if
anything else
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$B$1" Then Exit Sub
Rows.Hidden = False
If UCase(Target) = "YES" Then Rows("58:60").Hidden = True
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
message
Thanks, John, but seems like I can't click on any other cell once that
code is in effect. it keeps updating itself and won't let me click on
another cell. I'm trying to create a form, and so I have to click on
other cells...etc.
How can I avoid that?
Thanks!- Hide quoted text -
- Show quoted text -
Are you replying to Don or Ron?? If to Don, I said to use THIS, as IS
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$A$56" Then Exit Sub
Rows.Hidden = False
If UCase(Target) = "YES" Then Rows("58:60").Hidden = True
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
Thanks, Ron! But the code is not working.
I pasted the code in the worksheet
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("A56") = "Yes" Then
Rows("58:60").Select
Selection.EntireRow.Hidden = True
End If
End Sub
I entered "No" in A56, but nothing is happening.
Thanks!
Are you replying to Don or Ron?? If to Don, I said to use THIS, as IS
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$A$56" Then Exit Sub
Rows.Hidden = False
If UCase(Target) = "YES" Then Rows("58:60").Hidden = True
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
message
Thanks, Ron! But the code is not working.
I pasted the code in the worksheet
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("A56") = "Yes" Then
Rows("58:60").Select
Selection.EntireRow.Hidden = True
End If
End Sub
I entered "No" in A56, but nothing is happening.
Thanks!
Glad you figured it out.
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
Code works great! You're a genius, my friend!
Thanks a great deal!- Hide quoted text -
- Show quoted text -
Glad you figured it out.
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
message
Code works great! You're a genius, my friend!
Thanks a great deal!- Hide quoted text -
- Show quoted text -
I, Don Guillett, did NOT provide what you have shown. I provided. What do
you want to do????
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$A$56" Then Exit Sub
Rows.Hidden = False
If UCase(Target) = "YES" Then Rows("58:60").Hidden = True
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
One more question, Don. You had supplied me with a code that enables
sheet to hide itself based on cell values. That code is placed on a
sheet named "main." And it's a Private Sub Worksheet_Change code (the
code is pasted below). My question is how can I combine the code below
with the one (hide row code) you just supplied above. The code does
not work when I tried to place both on the sheet named "main."
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$A$1" Then Exit Sub
If IsNumeric(Target) And Target _
<= Sheets.Count And Target <> 1 Then
For Each WS In Worksheets
If WS.Name <> "Main" Then WS.Visible = False
Next WS
Sheets("Sheet" & Target).Visible = True
End If
End Sub
The hide row code you just provided is:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("A56") = "Yes" Then
Rows("58:60").Select
Selection.EntireRow.Hidden = True
End If
End Sub
How can I combine both so they can both work at the same time? The
sheet name is "main" Or how can I make three or four of these Private
Sub Worksheet_SelectionChange work with each other so I can always
adjust it going forward?
Thanks!- Hide quoted text -
- Show quoted text -