Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
i need instruction on a coding problem. i've determined it's not possible to
use conditional formatting to accomplish what i'm trying to achieve. cell C23 is a drop down menu with choices "yes" and "no" if c23 is no, i want rows 24-26 to be automatically hidden. what is the VBA code for this, and how do i input it in the worksheet (step by step)? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
One way:
Insert this in the worksheet code module (right-click the worksheet tab and choose View Code): Private Sub Worksheet_Change(ByVal Target As Excel.Range) Range("24:26").EntireRow.Hidden = (LCase(Range("C23")) = "no") End Sub In article , pls wrote: i need instruction on a coding problem. i've determined it's not possible to use conditional formatting to accomplish what i'm trying to achieve. cell C23 is a drop down menu with choices "yes" and "no" if c23 is no, i want rows 24-26 to be automatically hidden. what is the VBA code for this, and how do i input it in the worksheet (step by step)? |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks! if i have additional conditions i want to add, how do i add that to
the code? for example, i tried to add the following before the End Sub, and got an error: Range("7:10").EntireRow.Hidden = (LCase(Range("D6")) = "new client") "JE McGimpsey" wrote: One way: Insert this in the worksheet code module (right-click the worksheet tab and choose View Code): Private Sub Worksheet_Change(ByVal Target As Excel.Range) Range("24:26").EntireRow.Hidden = (LCase(Range("C23")) = "no") End Sub In article , pls wrote: i need instruction on a coding problem. i've determined it's not possible to use conditional formatting to accomplish what i'm trying to achieve. cell C23 is a drop down menu with choices "yes" and "no" if c23 is no, i want rows 24-26 to be automatically hidden. what is the VBA code for this, and how do i input it in the worksheet (step by step)? |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
What error do you get - your line of code works fine for me.
In article , pls wrote: Thanks! if i have additional conditions i want to add, how do i add that to the code? for example, i tried to add the following before the End Sub, and got an error: Range("7:10").EntireRow.Hidden = (LCase(Range("D6")) = "new client") |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
nevermind - it's working for me now as well. thanks again for the help.
"JE McGimpsey" wrote: What error do you get - your line of code works fine for me. In article , pls wrote: Thanks! if i have additional conditions i want to add, how do i add that to the code? for example, i tried to add the following before the End Sub, and got an error: Range("7:10").EntireRow.Hidden = (LCase(Range("D6")) = "new client") |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Protect Cell Formatting including Conditional Formatting | Excel Discussion (Misc queries) | |||
conditional Formatting based on cell formatting | Excel Worksheet Functions | |||
conditional Formatting based on cell formatting | Excel Worksheet Functions | |||
conditional formatting | Excel Worksheet Functions | |||
Conditional Formatting that will display conditional data | Excel Worksheet Functions |