Sub signatures(srow As Integer, pnum As String, fac2 As String, nrec As Long, st As Variant)
'signatures are assigned based on that facility's assigned crew and eligible shift
'this assignmnet, whether a signature is required or not, determines the crew assignemnt of this booking
'srow = the row on the master worksheet being analysed
Dim cd_rrow As Integer 'the row that the current record resides in CORE_DATA
mbevents = False
Stop
'find the row (cd_rrow) in CORE_DATA for which the unique currect booking resides (permit#, facility, and start time)
v1 = Application.WorksheetFunction.Match(pnum, ws_cd.Columns(17), 0) 'returns row number of first match of pnum in column 17 eg 2
v2 = Application.WorksheetFunction.Match(fac2, ws_cd.Columns(6), 0) 'returns row number of first match of pnum in column 6 eg 2
'v3
Dim V As Variant, v3 As Variant
V = ws_cd.Columns(2).Value
For iv = 1 To UBound(V, 1)
V(iv, 1) = Round(V(iv, 1), 3)
Next iv
'V is an array that holds the rounded values in column 2
' try matching one of the values in col B, say the value in cell B5
v3 = Application.Match(Round(st, 3), V, 0)
If Not IsError(v3) Then
MsgBox v3
Else
MsgBox "no match in column B"
End If
If v1 = v2 And v1 = v3 Then
cd_drow = v1
MsgBox "The FIRST row in which all three criteria are satisfied is row : " & cd_drow
Else
MsgBox "There is no row that match all three criteria."
End If