Ironman
Well-known Member
- Joined
- Jan 31, 2004
- Messages
- 1,069
- Office Version
- 365
- Platform
- Windows
Hi
The following code in a worksheet_change event works, except for "jump from F to H on that same row":
Column G contains a formula that is dependent on the Col F value input and I think that's what's stopping the final part from running, but I don't know how to fix this.
Help appreciated.
Thank you!
The following code in a worksheet_change event works, except for "jump from F to H on that same row":
VBA Code:
Dim NextRow As Long
lr = Range("A" & Rows.Count).End(xlUp).Row
If target.Column = 2 And target.Value = "OTHER" Then
Range("A" & target.Row).Resize(, 6).Interior.Color = RGB(197, 217, 241)
Range("I" & target.Row).Resize(, 2).Interior.Color = RGB(197, 217, 241)
Application.EnableEvents = False
Range("I" & target.Row).Value = "Indoor bike session, 60 mins."
'select cell col F
Range("F" & target.Row).Select
Application.EnableEvents = True
Application.EnableEvents = False
MsgBox "Enter heart rate", vbInformation, "Indoor Bike Session Data"
' jump from F to H on that same row
If target.Address(0, 0) = Range("F" & lr).Address(0, 0) Then
Range("H" & target.Row).Select
Application.EnableEvents = True
End If
End If
Column G contains a formula that is dependent on the Col F value input and I think that's what's stopping the final part from running, but I don't know how to fix this.
Help appreciated.
Thank you!