I need this macro to make sure there is a letter "J" at the end of the value in column D if column K contains "Riser", "Cone", "Riser", and column N contains "Brevard"
see highlighted below, F14232 would be F14232J, F14424Z would be F14424ZJ...etc
code posted below, any help is appreciated
see highlighted below, F14232 would be F14232J, F14424Z would be F14424ZJ...etc
code posted below, any help is appreciated
VBA Code:
Public c As Long, lr As Long
Sub BrevardCounty()
For Each c In ws1.Range("N2:N" & lr)
If c Like "*Brevard*" Then Brevard = c.Offset(, -9)
For Each d In ws1.Range("K2:K" & lr)
If d Like "*4'*" And d Like "*Riser*" Or _
d Like "*4'*" And d Like "*Top Slab*" Or _
d Like "*4'*" And d Like "*Cone*" Then
If d.Offset(, -9) = Brevard Then
If Right(d.Offset(, -7), 1) <> "J" Then
d.Offset(, -7) = d.Offset(, -7) & "J"
End If
End If
End If
Next d
Next c
End Sub