Hope this makes sense.
I use the code below to search the CalendarNotesTriggerColumn range of the Calendar sheet and look for a duplicate value. If it finds a match it displays a MsgBox with relevant information from another sheet. What I can't figure out is how to add an additional value (in my case a date) from another column on the Calendar sheet (Column B, which is a date). It should read something similar to: "8254-55 (Lakeview Estates - Lot 55) already exists on 1/15/25. Do you want to create a duplicate?"
The 1/15/25 is what I need to pull from the row that has the duplicate.
I use the code below to search the CalendarNotesTriggerColumn range of the Calendar sheet and look for a duplicate value. If it finds a match it displays a MsgBox with relevant information from another sheet. What I can't figure out is how to add an additional value (in my case a date) from another column on the Calendar sheet (Column B, which is a date). It should read something similar to: "8254-55 (Lakeview Estates - Lot 55) already exists on 1/15/25. Do you want to create a duplicate?"
The 1/15/25 is what I need to pull from the row that has the duplicate.
VBA Code:
For Each rngCELL In Worksheets("Calendar").Range("CalendarNotesTriggerColumn").Cells
If rngCELL.Value = Worksheets("JobGrid").Range("J1").Value Then
Ans = MsgBox(Worksheets("JobGrid").Range("J1").Value & " (" & Worksheets("JobGrid").Range("C1").Value & " - Lot " & Worksheets("JobGrid").Range("E1").Value & ") already exists. Do you want to create a duplicate?", vbYesNo + vbQuestion)
If Ans = vbNo Then
End If
Next