I have a few thousand excel files that need to be modified, one of the modifications is changing the value from Yes to No in column E based on value from column D.
For example, if value in D is: F13345C, or F13355C, or F13365C, and if the value in E is Yes, this Yes will need to be changed to No
This is what I have so far, any help is appreciated
Edit: I found the issue, missing End If near the end, code is working fine now
For example, if value in D is: F13345C, or F13355C, or F13365C, and if the value in E is Yes, this Yes will need to be changed to No
This is what I have so far, any help is appreciated
Edit: I found the issue, missing End If near the end, code is working fine now
VBA Code:
Sub ChangeYesToNo()
LastRow = Range("A" & Rows.Count).End(xlUp).Row
For i2 = 2 To LastRow
If Range("D" & i2).Value Like "*F13345C*" Or _
Range("D" & i2).Value Like "*F13355C*" Or _
Range("D" & i2).Value Like "*F13365C*" Then
Range("E" & i2).Value = "No" 'THIS IS WHERE THE BELL TOP SLABS CHANGED FROM NO TO YES
End If
Next i2
End Sub
Last edited: