Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want the value in cell H18 to appear or not appear based on the
value selected and displayed in cell N14. For example, when cell N14 = "Diamond" I want the value in cell H18 to be hidden. Here's my code but the statement for case "Diamond" won't execute: Private Sub Worksheet() Dim Pattern As String Pattern = Range("N14") Application.ScreenUpdating = False Application.ActiveSheet.Range("H18").Select Application.ScreenUpdating = True Select Case (Pattern) 'Application.ActiveSheet.Range("H18").Select Case "Diamond" Cell.Value = "" End Select End Sub |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
twlove,
If you have a real need to select H18, then, change Cell.Value = "" with this ActiveCell.Value = "" However, note that you don't need to select a cell to work with it so you can also code it this way: Private Sub Worksheet() Dim Pattern As String Pattern = Range("N14") Select Case (Pattern) Case "Diamond" Range("H18").Value = "" End Select End Sub -- Hope that helps. Vergel Adriano " wrote: I want the value in cell H18 to appear or not appear based on the value selected and displayed in cell N14. For example, when cell N14 = "Diamond" I want the value in cell H18 to be hidden. Here's my code but the statement for case "Diamond" won't execute: Private Sub Worksheet() Dim Pattern As String Pattern = Range("N14") Application.ScreenUpdating = False Application.ActiveSheet.Range("H18").Select Application.ScreenUpdating = True Select Case (Pattern) 'Application.ActiveSheet.Range("H18").Select Case "Diamond" Cell.Value = "" End Select End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
change data of entire column from small case to upper case | Excel Worksheet Functions | |||
Changing multiple cell text from lower case to upper case | Excel Discussion (Misc queries) | |||
excel'03 how to convert a column from upper case to proper case | Excel Discussion (Misc queries) | |||
Change the text from lower case to upper case in an Excel work boo | Excel Discussion (Misc queries) | |||
How do I change existing text from lower case to upper case | Excel Discussion (Misc queries) |