Hello I have a cell range C5:F34
Each row relates to same record with a different column heading C:F. I would like to be able to clear all cells except for the rows that have “Not Arrived” or “DCase” in column F.
I have made a start with the below however it only deletes the contents of cell F & not C:E aswell? I’m also not sure how to add “DCase” into the criteriacell.Value section, can only get it to work with one or the other.
many thanks for any help that can be given.
TEST Macro
'
Dim criteriarange As Range
Dim criteriacell As Range
Set criteriarange = Range("F5:F34")
For Each criteriacell In criteriarange
If Not criteriacell.Value = "Not Arrived" Then
criteriacell.ClearContents
End If
Next criteriacell
End Sub
Each row relates to same record with a different column heading C:F. I would like to be able to clear all cells except for the rows that have “Not Arrived” or “DCase” in column F.
I have made a start with the below however it only deletes the contents of cell F & not C:E aswell? I’m also not sure how to add “DCase” into the criteriacell.Value section, can only get it to work with one or the other.
many thanks for any help that can be given.
TEST Macro
'
Dim criteriarange As Range
Dim criteriacell As Range
Set criteriarange = Range("F5:F34")
For Each criteriacell In criteriarange
If Not criteriacell.Value = "Not Arrived" Then
criteriacell.ClearContents
End If
Next criteriacell
End Sub