M
Mark
I am using Excel 97 and want to calculate weekdays between
two cell values. I have found the following function and
cell function from Microsoft but want it to look up cell
references instead of dates can anyone assist please?
Here's the function:
Function DateSpan(BegDate As Date, EndDate As Date) As
Variant
Dim DateArray() As Variant, i As Integer, Span As
Integer
BegDate = DateValue(BegDate)
EndDate = DateValue(EndDate)
Span = EndDate - BegDate + 1
ReDim DateArray(1 To Span)
For i = 1 To Span
DateArray(i) = BegDate + i - 1
Next
DateSpan = DateArray
End Function
Here's the cell code:
=NETWORKDAYS(DATEVALUE("12/1/98"), DATEVALUE("1/1/99"),
DateSpan("12/24/98","1/1/99"))
I want to change the dates listed to a cell reference.
Thanks in anticipation
Mark
two cell values. I have found the following function and
cell function from Microsoft but want it to look up cell
references instead of dates can anyone assist please?
Here's the function:
Function DateSpan(BegDate As Date, EndDate As Date) As
Variant
Dim DateArray() As Variant, i As Integer, Span As
Integer
BegDate = DateValue(BegDate)
EndDate = DateValue(EndDate)
Span = EndDate - BegDate + 1
ReDim DateArray(1 To Span)
For i = 1 To Span
DateArray(i) = BegDate + i - 1
Next
DateSpan = DateArray
End Function
Here's the cell code:
=NETWORKDAYS(DATEVALUE("12/1/98"), DATEVALUE("1/1/99"),
DateSpan("12/24/98","1/1/99"))
I want to change the dates listed to a cell reference.
Thanks in anticipation
Mark