Hello,
Thank you for your help.
I'm using Excel 2016 in Office 365 and have been trying to work on code that will trigger a msgbox when you add the word "Complete" to column O, but only if the word "1x1" is in column H.
I want to try learn more of VBA, and I wrote this code below based on a variation of a code found on the web but nothing happens. No errors and no msgbox, nothing.
I've tried variations of different codes found on the web, and the only ones that work are if I just add "Complete" in column O. If I try to add another criteria, meaning that there must be "1x1" in column H, it won't work. I either get Type Mismatch or nothing happens at all.
I would appreciate the help. Thank you in advance.
Thank you for your help.
I'm using Excel 2016 in Office 365 and have been trying to work on code that will trigger a msgbox when you add the word "Complete" to column O, but only if the word "1x1" is in column H.
I want to try learn more of VBA, and I wrote this code below based on a variation of a code found on the web but nothing happens. No errors and no msgbox, nothing.
I've tried variations of different codes found on the web, and the only ones that work are if I just add "Complete" in column O. If I try to add another criteria, meaning that there must be "1x1" in column H, it won't work. I either get Type Mismatch or nothing happens at all.
I would appreciate the help. Thank you in advance.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim r As Range
If Not (Application.Intersect(Range("o1:o210"), Target) Is Nothing) Then
For Each r In Intersect(Target, Range("h10:o210"))
If r.Value = "1x1" And r.Value = "Complete" Then
MsgBox "Billing 1x1"
End If
Next r
End If
End Sub