Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Column B will have the criteria (y or n). If n is entered, the data in the two cells adjacent and to the right of the current cell must have the contents cleared. I can accomplish this for one row in Column B but I need to have this occur for the other rows. This is what I have so far.. Private Sub Worksheet_Change(ByVal Target As Range) Dim rng1 As Range Dim rng2 As Range Set rng1 = Range("b2") Set rng2 = Range("c2:d2") If LCase(rng1.Value) = "n" Then rng2.clearcontents End If End Sub Any help is appreciated. This is my first shot at VBA. -- CK |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Display contents of cell based on criteria | Excel Worksheet Functions | |||
Replacing Path/filename and criteria in MS Query based on cell contents using VBA | Excel Programming | |||
Finding cell contents based on certain criteria | Excel Discussion (Misc queries) | |||
Finding cell contents based on certain criteria | Excel Discussion (Misc queries) | |||
Delete/clear a cell based on another cells contents | Excel Programming |