P
PJH
Here is my problem...I need to calculate the age (using VBA) of an item,
however when my spreadsheet refreshes (importing data via web query) there
are numerous date formats depending on when a user modified, closed, or
adjusted the particular item. If the item is "acted on" (i.e. opened,
closed, modified, etc.) in the seven days prior to my report then the date
appears as DayofWeek Time (i.e. Wed 15:15). To complicate matters further,
if the item is "acted on" during the day that I run my report then the date
column contains the time of the action on the item (i.e. 7:16). The only
other variable in this problem is "Status"...if the item is "Closed", I
determine the age by calculating the difference between Column B then Column
C, if it is not "Closed", then the age is determined by calculating the
difference between Column B and now().
Examples:
A B C
D E
Item Date Opened Date Closed/Changed Age of Item Status
1 01/01/08 02/01/08 30
Closed
2 08/06/08 Wed 15:15 ?
3 02/01/08 16:11 ?
however when my spreadsheet refreshes (importing data via web query) there
are numerous date formats depending on when a user modified, closed, or
adjusted the particular item. If the item is "acted on" (i.e. opened,
closed, modified, etc.) in the seven days prior to my report then the date
appears as DayofWeek Time (i.e. Wed 15:15). To complicate matters further,
if the item is "acted on" during the day that I run my report then the date
column contains the time of the action on the item (i.e. 7:16). The only
other variable in this problem is "Status"...if the item is "Closed", I
determine the age by calculating the difference between Column B then Column
C, if it is not "Closed", then the age is determined by calculating the
difference between Column B and now().
Examples:
A B C
D E
Item Date Opened Date Closed/Changed Age of Item Status
1 01/01/08 02/01/08 30
Closed
2 08/06/08 Wed 15:15 ?
3 02/01/08 16:11 ?