Formula in Excel is different to Access

mahmed1

Well-known Member
Joined
Mar 28, 2009
Messages
2,302
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi - I am trying to get a total of Labor time and divide by Total chats to give me AHT

The formula in Access returns different to Excel (Maybe its to do with Access times going over 24 hours) not sure

Here is my formula

ROUND((SUM(t.[LABOR TIME])/SUM(t.[INTERACTIVE CHATS]))*86400,0) AS Concurrent_AHT (Average Handling Time)

If i do the same formula in Excel where i take the (sum(Labor Time)/Sum(Interactive Chats))*86400 I am getting different results by a few hundred seconds

Is this a know issue or do i need to calculate the sum of hours differently?
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
So in Labour time say i had

14:00
14:00
14:00
14:00

Thats 56:00:00 hours total labor time
Dividing that Total chats = AHT * 86000 i convert it to AHT in seconds
but this does not give the same result of i added in Excel and performed same calculations
 
Upvote 0
  • you are dealing with a lot of fractional/decimal/floating point values which is always bad for precision in any software
  • I think round is different in Access and Excel
  • not sure what your datatypes are in Access vs. Excel
  • in post 1 you have 86400 and in post 2 you have 86000 so be sure you are using the same factor
  • make sure in both cases you are applying rounding in the same way, at the same step in the calculations, and results are formatted the same way (or preferably are not formatted. For comparison might want to not round at all at any point to check results.
 
Upvote 0
Thank you Xenou - the 86000 was a typo error
It is 86400...

so all im trying to do is sum the total of Chat time which has Hours Mins and Secs (ie 08:15:26) etc.. and then divide that by total labor time which is in the same format and the either round to 2 decimal or even format 2 decimal points....

if i extract the same data from
Access to excel and do the exact same thing sum(chat time)/sum(labor time) i would expect same result but

the *86400 is just to convert result into total seconds

what is the best formula/SQL code/Query in Access to get same result
 
Upvote 0
  • you are dealing with a lot of fractional/decimal/floating point values which is always bad for precision in any software
  • I think round is different in Access and Excel
  • not sure what your datatypes are in Access vs. Excel
  • in post 1 you have 86400 and in post 2 you have 86000 so be sure you are using the same factor
  • make sure in both cases you are applying rounding in the same way, at the same step in the calculations, and results are formatted the same way (or preferably are not formatted. For comparison might want to not round at all at any point to check results.
Sorry to use your reply message when responding back.. thank you
 
Upvote 0
I don't have a ready at hand formula. Personally I don't like to do math on times or try to divide times by times. I would convert the time to seconds and do all the work in seconds. If you aren't getting correct results I would suggest you post a sample set of data that illustrates the problem.
 
Upvote 0
Thank you - Im trying to convert all in seconds and then divide
my Access formula i tried was
(Sum(ChatTime)*86400)/(sum(laborTime)*86400)
 
Upvote 0
I tried that formula and it works correctly for me.
 
Upvote 0

Forum statistics

Threads
1,214,922
Messages
6,122,281
Members
449,075
Latest member
staticfluids

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