Time Function

VENKYS

Board Regular
Joined
May 19, 2009
Messages
101
Dear All

USING VLOOKUP I HAVE EXTRACTED CERTAIN DATA, WHICH NOW SHOWS AS BELOW

...recd_time...... log_time..........proc_time.......reproc_time.......diff
1:00:00 AM...........................................................................
12:45:00PM......13:50:00 PM....14:50:00 PM...............................
13:50:00 PM.....14:45:00 PM....16:30:00 PM...............................

what i want is

A) that in event proc_time is > 16:30:00 PM the reproc time should be shown as 09:30:00 AM
B) else proc_time should be displayed as reproc_time
C) if log_time is not mentioned then recd_time should be reproc_time
D) next i want to calculate the DIFF

So, my final output will be something in line with as below

...recd_time...... log_time..........proc_time.......reproc_time.......diff.....
1:00:00 AM.................................................1:00:00 AM................
12:50:00PM......13:50:00 PM....14:50:00 PM....14:50:00 PM......2:00:00.
13:30:00 PM.....14:45:00 PM....16:30:00 PM....09:30:00 AM.....20:00:00.


How do i proceed.

Kindly help... thanks in advance.... venky
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Dear All

USING VLOOKUP I HAVE EXTRACTED CERTAIN DATA, WHICH NOW SHOWS AS BELOW

...recd_time...... log_time..........proc_time.......reproc_time.......diff
1:00:00 AM...........................................................................
12:45:00PM......13:50:00 PM....14:50:00 PM...............................
13:50:00 PM.....14:45:00 PM....16:30:00 PM...............................

what i want is

A) that in event proc_time is > 16:30:00 PM the reproc time should be shown as 09:30:00 AM
B) else proc_time should be displayed as reproc_time
C) if log_time is not mentioned then recd_time should be reproc_time
D) next i want to calculate the DIFF

So, my final output will be something in line with as below

...recd_time...... log_time..........proc_time.......reproc_time.......diff.....
1:00:00 AM.................................................1:00:00 AM................
12:50:00PM......13:50:00 PM....14:50:00 PM....14:50:00 PM......2:00:00.
13:30:00 PM.....14:45:00 PM....16:30:00 PM....09:30:00 AM.....20:00:00.


How do i proceed.

Kindly help... thanks in advance.... venky
Let A1:E4 house the contents of the exhibit you posted.

D2, just enter and copy down:

=IF(B2="",A2,IF(C2>TIME(16,30,0),TIME(9,30,0),C2))

E2, just enter and copy down:

=IF(D2=A2,"",D2-A2+(D2 < A2))

Custom format E2 as [h]:mm.
 
Upvote 0

Forum statistics

Threads
1,224,550
Messages
6,179,462
Members
452,915
Latest member
hannnahheileen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top