Hey everyone,
I'm stumped. Have a worksheet and assigned a macro button that will clear contents of a specific range. The clear button works but I just want to clear the cells that contain W while leaving the cells that are marked X.
Thanks
Hey everyone,
I'm stumped. Have a worksheet and assigned a macro button that will clear contents of a specific range. The clear button works but I just want to clear the cells that contain W while leaving the cells that are marked X.
Thanks
![]()
Option Explicit Sub ClearW() Dim c As Range Dim rng As Range Dim lr As Long lr = Range("A" & Rows.Count).End(xlUp).Row Set rng = Range("B2:O" & lr) For Each c In rng If c = "W" Then c.ClearContents Next c End Sub
Alan עַם יִשְׂרָאֵל חַי
Change an Ugly Report with Power Query
Database Normalization
Complete Guide to Power Query
Man's Mind Stretched to New Dimensions Never Returns to Its Original Form
works perfectly. Thanks so much!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks