J jawaharprm Member Aug 22, 2022 #1 Hi All, Pls help to get this macro from ("C:N") cells should be clear if in column "B" Criteria meets "ST" reference file enclosed Thanks Jawahar Attachments Book1.xlsx 9.6 KB · Views: 2
Hi All, Pls help to get this macro from ("C:N") cells should be clear if in column "B" Criteria meets "ST" reference file enclosed Thanks Jawahar
V vletm Excel Ninja Aug 22, 2022 #2 jawaharprm Ask an Excel Question and Macro to Clear Cells based on Criteria ... won't match. This thread has moved to VBA Macros
jawaharprm Ask an Excel Question and Macro to Clear Cells based on Criteria ... won't match. This thread has moved to VBA Macros
AlanSidman Well-Known Member Aug 22, 2022 #3 Code: Option Explicit Sub foo() Dim lr As Long, i As Long lr = Range("A" & Rows.Count).End(xlUp).Row For i = 5 To lr If Range("B" & i) = "ST" Then Range("C" & i & ":N" & i).ClearContents Next i End Sub
Code: Option Explicit Sub foo() Dim lr As Long, i As Long lr = Range("A" & Rows.Count).End(xlUp).Row For i = 5 To lr If Range("B" & i) = "ST" Then Range("C" & i & ":N" & i).ClearContents Next i End Sub
V vletm Excel Ninja Aug 23, 2022 #4 jawaharprm Your Keywords were clear & meets. Attachments Book1.xlsb 14.9 KB · Views: 2
J jawaharprm Member Aug 23, 2022 #5 Hi Sir, Thanks its working fine, Sorry for uploading in wrong criteria..