My knowledge of VB script is exceptional poor:
I am using software that allows the use of VB Script. The scenario:
I have identified a list of 461 items. The number of items will change every month. Each item has two dates I wish to compare and then count some of the results. I can export this list into excel and easily do the operation there however I am attempting to automate the process using VB Script.
The variables:
A: Expected delivery date
B: Closed date and time
In Excel I use DateDif(A,B,d) for each line. Then I use Count(the datedif results column,>0).
The objective is to know how many items have not been delivered before A (the expected delivery date).
I have tried various combinations of script functions to achieve a single value to be presented but without luck; typically mismatches. See below:
Function NumIndValue
If DateDif(A>B) Then
NumInvalue = 0
If DateDif(B>=A) Then
NumIndValue = Count(DateDif(B>A))
End If
End If
End Function
Any help would be greatly appreciated.
I am using software that allows the use of VB Script. The scenario:
I have identified a list of 461 items. The number of items will change every month. Each item has two dates I wish to compare and then count some of the results. I can export this list into excel and easily do the operation there however I am attempting to automate the process using VB Script.
The variables:
A: Expected delivery date
B: Closed date and time
In Excel I use DateDif(A,B,d) for each line. Then I use Count(the datedif results column,>0).
The objective is to know how many items have not been delivered before A (the expected delivery date).
I have tried various combinations of script functions to achieve a single value to be presented but without luck; typically mismatches. See below:
Function NumIndValue
If DateDif(A>B) Then
NumInvalue = 0
If DateDif(B>=A) Then
NumIndValue = Count(DateDif(B>A))
End If
End If
End Function
Any help would be greatly appreciated.