I need to modify some excel files, some of the values in certain cells in column K exceeds 40
when this happens, I will need to remove these characters from the cell: (SAN), (WET), COVER (any of these cell will only contain one of these words, SAN and WET always has the parenthesis)
example column K values below:
when this happens, I will need to remove these characters from the cell: (SAN), (WET), COVER (any of these cell will only contain one of these words, SAN and WET always has the parenthesis)
example column K values below:
(WET)MH,8'dia,Base,10"w,SOG,144x14"BS,waterstop
Code below, this is not working so far... any help is appreciated |
VBA Code:
Sub CleanUpStringsLongerThanForty()
With Range("K2:K" & Range("K" & Rows.Count).End(xlUp).Row)
If Len("K2:K") > 40 Then
Replace("COVER", "(SAN)", "(WET)", "")
End If
End With
End Sub