Sandcastor
Board Regular
- Joined
- May 14, 2012
- Messages
- 97
I require a little help streamlining a Worksheet_Change event to target only two cells.
In info sheet requires my technicians entering the date their meters were last calibrated, and pops up a warning dialogue (which works just fine) when the meters are due to be calibrated, or overdue.
The Script:
Based on a date entered into named range "CalDate1" and "CalDate2", two other reference Cells (CA10 and CB10 respectively) return the values "Good", "Due", and "Overdue". I have the warning dialogue scripts called on a Worksheet_change, but this causes every entry in the sheet take nearly a whole second to update.
Can I focus the worksheet_change on the two ranges where the date is entered, so that the script fires only when a date is entered into either "CalDate1" or "CalDate2"?
In info sheet requires my technicians entering the date their meters were last calibrated, and pops up a warning dialogue (which works just fine) when the meters are due to be calibrated, or overdue.
The Script:
Based on a date entered into named range "CalDate1" and "CalDate2", two other reference Cells (CA10 and CB10 respectively) return the values "Good", "Due", and "Overdue". I have the warning dialogue scripts called on a Worksheet_change, but this causes every entry in the sheet take nearly a whole second to update.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("CA10").Value <> 0 Then
Serial1
End If
If Range("CB10").Value <> 0 Then
Serial2
End If
End Sub
Can I focus the worksheet_change on the two ranges where the date is entered, so that the script fires only when a date is entered into either "CalDate1" or "CalDate2"?