Hi…
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o> </o>
I am comparing two dates— the first date is the current system date and the second date is in column G starting at row 2 through row x. I need to determine if the system date is past the date in Gx or if the system date is within a “configurable” number of business days to the date in Gx. During run-time, I am receiving a Type mismatch on the Evaluate statement.
<o> </o>
The code below:
<o> </o>
RRptHD() – an array (Long) that has the column information.
RRptHDC7 – is the offset into the array that points to the column number that is stored in the array.
At debug: this value is, as expected 7 for the column number.
<o> </o>
OIRGroupCount() is an array where I build my counts for use of displaying later.
<o> </o>
RPTDueDate() an array (Long) that has the row and column information of a configurable date in the sheet “Lists”.
RptDueDateR1 and RptDueDateC1 are offsets into the array where at the offset, the row number and column number of the “configurable” number of days is store in the sheet “Lists”.
At debug: the values are, as expected RptDueDateR1 is 1 for the row number, RptDueDateC1 is 17 for the column number.
<o> </o>
If Evaluate("NETWORKDAYS(Now()," & Cells(i, RRptHD(RRptHDC7)) & ")") < 1 Then
OIRGroupCount(2) = OIRGroupCount(2) + 1
Else
If Evaluate("NETWORKDAYS(Now()," & Cells(i, RRptHD(RRptHDC7)) & ")") <= Sheets("Lists").Cells(RptDueDate(RptDueDateR1), RptDueDate(RptDueDateC1)) Then
OIRGroupCount(1) = OIRGroupCount(1) + 1
End If
End If<o></o>
<o> </o>
If there is a different way of doing a Now() and/or Networkdays, please let me know..
<o> </o>
Thanks for the help…
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o> </o>
I am comparing two dates— the first date is the current system date and the second date is in column G starting at row 2 through row x. I need to determine if the system date is past the date in Gx or if the system date is within a “configurable” number of business days to the date in Gx. During run-time, I am receiving a Type mismatch on the Evaluate statement.
<o> </o>
The code below:
<o> </o>
RRptHD() – an array (Long) that has the column information.
RRptHDC7 – is the offset into the array that points to the column number that is stored in the array.
At debug: this value is, as expected 7 for the column number.
<o> </o>
OIRGroupCount() is an array where I build my counts for use of displaying later.
<o> </o>
RPTDueDate() an array (Long) that has the row and column information of a configurable date in the sheet “Lists”.
RptDueDateR1 and RptDueDateC1 are offsets into the array where at the offset, the row number and column number of the “configurable” number of days is store in the sheet “Lists”.
At debug: the values are, as expected RptDueDateR1 is 1 for the row number, RptDueDateC1 is 17 for the column number.
<o> </o>
If Evaluate("NETWORKDAYS(Now()," & Cells(i, RRptHD(RRptHDC7)) & ")") < 1 Then
OIRGroupCount(2) = OIRGroupCount(2) + 1
Else
If Evaluate("NETWORKDAYS(Now()," & Cells(i, RRptHD(RRptHDC7)) & ")") <= Sheets("Lists").Cells(RptDueDate(RptDueDateR1), RptDueDate(RptDueDateC1)) Then
OIRGroupCount(1) = OIRGroupCount(1) + 1
End If
End If<o></o>
<o> </o>
If there is a different way of doing a Now() and/or Networkdays, please let me know..
<o> </o>
Thanks for the help…