Does anyone know how to delete all cell data that is not all CAPS and leave everything that is all CAPS? Ive tried these two pieces of code I found online, but neither works. The first clears everything and the second deletes the blank rows only. Thanks
Code:
Sub Delete_Cells_Without_Caps()
Dim k As Long
For k = 1 To 50000
' If Worksheets("junk").Cells(k, "b").Value <> "Caps" Then
Worksheets("junk").Cells(k, "a").ClearContents
' End If
Next
End Sub
Code:
Sub Delete_Cells_Without_Caps()
For i = 50000 To 1 Step -1
If Range("A" & i).Value = LCase(Range("A" & i).Value) Then
Range("A" & i).EntireRow.Delete
End If
Next i
End Sub