[Solved] Creating a button which matches 2 columns and put a value in 3rd column [closed]


Not sure if you want to delete the values in column 1 and column 2 if they are not b or 4.

Private Sub CommandButton1_Click()

For i = 2 To 6 'Give the range as per your requirement

 If Cells(i, 1) = "b" And Cells(i, 2) = 4 Then
 Cells(i, 3).Value = "Yes"
 End If


Next

End Sub

1

solved Creating a button which matches 2 columns and put a value in 3rd column [closed]