Hi Guys,
I'd like to know if there is a way to extract date and time with VBA based on an IF from a different cell, I can use =if(A1="Yes",Now(),""), however this formula will change the date and time every time the spreadsheet is opened or modify and I need the original date and time to calculate the time that took certain process to complete. Also I'd like to know if it is possible to calculate SLA in hours/minutes based on Start date/time and Closed date/time for example below, thanks for all your help.
[TABLE="width: 507"]
<TBODY>[TR]
[TD][/TD]
[TD]A</SPAN>
[/TD]
[TD]B</SPAN>
[/TD]
[TD]C</SPAN>
[/TD]
[TD]D</SPAN>
[/TD]
[TD]F</SPAN>
[/TD]
[/TR]
[TR]
[TD="align: right"]1</SPAN>
[/TD]
[TD]Start</SPAN>
[/TD]
[TD]Date/Time</SPAN>
[/TD]
[TD]Closed</SPAN>
[/TD]
[TD]Date/Time</SPAN>
[/TD]
[TD]SLA</SPAN>
[/TD]
[/TR]
[TR]
[TD="align: right"]2</SPAN>
[/TD]
[TD]Yes</SPAN>
[/TD]
[TD]1/20/2013 13:25</SPAN>
[/TD]
[TD]Yes</SPAN>
[/TD]
[TD]1/21/2013 2:40</SPAN>
[/TD]
[TD]13 hrs 15 min (Closed date/time - Start date/time)</SPAN>
[/TD]
[/TR]
[TR]
[TD="align: right"]3</SPAN>
[/TD]
[TD]No</SPAN>
[/TD]
[TD][/TD]
[TD]No</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]4</SPAN>
[/TD]
[TD]Yes</SPAN>
[/TD]
[TD]1/20/2013 15:33:00 PM</SPAN>
[/TD]
[TD]No</SPAN>
[/TD]
[TD]Since this is NO
Date/Time should be current date
and time.
[/TD]
[TD]
[/TD]
[/TR]
</TBODY>[/TABLE]
I'd like to know if there is a way to extract date and time with VBA based on an IF from a different cell, I can use =if(A1="Yes",Now(),""), however this formula will change the date and time every time the spreadsheet is opened or modify and I need the original date and time to calculate the time that took certain process to complete. Also I'd like to know if it is possible to calculate SLA in hours/minutes based on Start date/time and Closed date/time for example below, thanks for all your help.
[TABLE="width: 507"]
<TBODY>[TR]
[TD][/TD]
[TD]A</SPAN>
[/TD]
[TD]B</SPAN>
[/TD]
[TD]C</SPAN>
[/TD]
[TD]D</SPAN>
[/TD]
[TD]F</SPAN>
[/TD]
[/TR]
[TR]
[TD="align: right"]1</SPAN>
[/TD]
[TD]Start</SPAN>
[/TD]
[TD]Date/Time</SPAN>
[/TD]
[TD]Closed</SPAN>
[/TD]
[TD]Date/Time</SPAN>
[/TD]
[TD]SLA</SPAN>
[/TD]
[/TR]
[TR]
[TD="align: right"]2</SPAN>
[/TD]
[TD]Yes</SPAN>
[/TD]
[TD]1/20/2013 13:25</SPAN>
[/TD]
[TD]Yes</SPAN>
[/TD]
[TD]1/21/2013 2:40</SPAN>
[/TD]
[TD]13 hrs 15 min (Closed date/time - Start date/time)</SPAN>
[/TD]
[/TR]
[TR]
[TD="align: right"]3</SPAN>
[/TD]
[TD]No</SPAN>
[/TD]
[TD][/TD]
[TD]No</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]4</SPAN>
[/TD]
[TD]Yes</SPAN>
[/TD]
[TD]1/20/2013 15:33:00 PM</SPAN>
[/TD]
[TD]No</SPAN>
[/TD]
[TD]Since this is NO
Date/Time should be current date
and time.
[/TD]
[TD]
[/TD]
[/TR]
</TBODY>[/TABLE]