Converting time using IF statement

dakashmir

New Member
Joined
Apr 20, 2016
Messages
3
Hello All,
We use Avaya for our time tracking that records our technicians login/logoff time on the phone. I can get a report that shows their login/logoff punches as well as the total time for that day. My staff has a hard time figuring out 100'ths for minutes which is what Avaya records the time as. I'm trying to build a table in Excel that will take their total time (8:65) and convert it to quarter hours (8:45) so they can record it for pay. I was trying to use the =IF(Right(A1,2)="#",",") combined with If(AND) statements but not getting anywhere. I wanted to the user to be able to just copy a weeks worth of total time into column A to have the calculations done. I tried to use column B to convert the time into a two digit number then have column C convert that number to either 00, 15, 30, or 45.
Column B: =IF(RIGHT(A2,2)="<=24","0",IF(AND(A2>=25,A2<=49),"15",IF(AND(A2>=50,A2<=74),"30",IF(AND(A2>=75,A2<=99),"45"))))
Column C: =IF(B2<=24,"0",IF(AND(B2>=25,B2<=49),"15",IF(AND(B2>=50,B2<=74),"30",IF(AND(B2>=75,B2<=99),"45"))))

After I get this figure this one out I'll tackle trying to build a macro that will take the Avaya file and copy it into this file and email it to the technician daily. So if you also have an idea on how to do that I'm all ears!

Thanks,
Rick
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
hopefully this will set you in the right direction...
=ROUNDDOWN(8.65,0)+MROUND((8.65-ROUNDDOWN(8.65,0))/100*60,0.15)

replace the 8.65 with the cell you have the decimal hours in and it should point you in the right direction...

cheers

Matthew
 
Upvote 0
I thought it worked the first time I did the test, then when I built the table out it didn't. The problem I have is in your example you used 8.65 but the time uses 8:65 which gives me a result of 0.3. Back to the drawing board.
 
Upvote 0

Forum statistics

Threads
1,213,535
Messages
6,114,192
Members
448,554
Latest member
Gleisner2

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