Hello,
I wrote a change event macro based on the user entering a number higher than 1 in the range D4:D27. It’s working, currently.
I want to add a condition so the macro only runs if the corresponding cell in column B has the word “Survey” or “Review”.
I tried using an And statement on this line but could not get it to work.
Any help is greatly appreciated.
Below is a snippet of the code.
I wrote a change event macro based on the user entering a number higher than 1 in the range D4:D27. It’s working, currently.
I want to add a condition so the macro only runs if the corresponding cell in column B has the word “Survey” or “Review”.
I tried using an And statement on this line but could not get it to work.
Code:
If Not Intersect(Target, Range("D4:D27")) Is Nothing Then
Any help is greatly appreciated.
Below is a snippet of the code.
Code:
'if the user enters a number other than 1 in column D
If Not Intersect(Target, Range("D4:D27")) Is Nothing Then
b = Target.Value
If b > 1 Then
'find last range
Dim LastR As Long
With Worksheets("Totals")
LastR = .Cells(.Rows.Count, "S").End(xlUp).Row
LastR = LastR + 1
End With
myname = Target.Offset(0, 2).Value