Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to write this into my current macro where I clear the cells that
don't contain the letters "RO" in the below range. Range("B4:BQ20").Select Any help is greatly appreciated. Thank you |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One way...
Sub ClearStuff() Dim rng As Range For Each rng In Range("B4:BQ20") If InStr(UCase(rng.Value), "RO") = 0 Then _ rng.ClearContents Next rng End Sub -- HTH... Jim Thomlinson "Frank" wrote: I am trying to write this into my current macro where I clear the cells that don't contain the letters "RO" in the below range. Range("B4:BQ20").Select Any help is greatly appreciated. Thank you |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Jim, Thank you, it works well.
"Jim Thomlinson" wrote: One way... Sub ClearStuff() Dim rng As Range For Each rng In Range("B4:BQ20") If InStr(UCase(rng.Value), "RO") = 0 Then _ rng.ClearContents Next rng End Sub -- HTH... Jim Thomlinson "Frank" wrote: I am trying to write this into my current macro where I clear the cells that don't contain the letters "RO" in the below range. Range("B4:BQ20").Select Any help is greatly appreciated. Thank you |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to clear range contents when cell contents are changed by us | Excel Programming | |||
Clear Contents Macro | Excel Programming | |||
Need macro to clear contents | Excel Programming | |||
VBA Macro to Clear Named Cell Contents | Excel Programming | |||
MACRO TO CLEAR CELL CONTENTS | Excel Programming |