Hello,
Need help on trying to use an if statement that will compare one cell to the other. The issue is one cell has multiple answers separated by a comma and I need it to treat each as its own answer to compare against. How would I write this code?
Basically trying to compare R50 to U33 if R50 contains the value in one of the commas it should display a 1 on U50 (See picture Below)
What I have now is:
Dim K As Integer
For K = 50 To 149
If Range("R" & K).Value = Range("U33").Value Then
Range("U" & K).Value = 1
Else
Range("U" & K).Value = 0
End If
Next K
This statement only helps if the Cells are an exact match
Need help on trying to use an if statement that will compare one cell to the other. The issue is one cell has multiple answers separated by a comma and I need it to treat each as its own answer to compare against. How would I write this code?
Basically trying to compare R50 to U33 if R50 contains the value in one of the commas it should display a 1 on U50 (See picture Below)
What I have now is:
Dim K As Integer
For K = 50 To 149
If Range("R" & K).Value = Range("U33").Value Then
Range("U" & K).Value = 1
Else
Range("U" & K).Value = 0
End If
Next K
This statement only helps if the Cells are an exact match