Solved

Formula Revision

Posted on 2013-01-11
6
231 Views
Last Modified: 2013-01-16
Hello Experts,

I have been working on a spreadsheet, with the help of a lot of you great folks at EE! Before I get into my question, I want to explain what this calculator does - that way you'll have a better chance at understanding my problem.

This spreadsheet is designed to track "Talk Time" during the employees shift.  Columns E:I accept time values, in hh:mm:ss format.  In the example I provided (view attachment), you'll see 4 times listed, each time listed represents a phone call and it's duration.

Each time value is added up, and calculated over on the left side.  My problem lies with cell C16.  Now to explain this cell, you'll need to understand this...

For every "ONE" hour the employee works, they need to be talking to customers for 0:24 minutes. So if I work a 5 hour shift, then I will need 2:00 hours of total talk time, or average 0:24 minutes per hour.

Hopefully I haven't lost you...

This value is in the "Today's Progress" section, so I want that information to be "up to the minute".  In order for that field to calculate my minutes per hour of talk time, the spreadsheet needs to know what time of day it is.

As you can see, my formula is referencing cell N2.  In my real world file, the reference will be changed to cell M2. Cell M2 using the =NOW() formula, but cell N2 uses any time value I type in for testing purposes.

Here is my problem...

Let's pretend you just finished your shift, you worked a total of 5 hours.  And during those 5 hours, you talked for a total of 2:00 hours.  You would be averaging 0:24 minutes per hour of talk time.

Let's also pretend, for whatever reason - you view this spreadsheet an hour after your shift ended.  Now change cell N2, to 6:00 PM. You will see cell C16 changes from 0:24 minutes per hour, to 0:20 minutes per hour.

I hope you're still following me here... :)

My goal is to show your average minutes per hour, based on the time you're working. I want it to provide "up to the minute" calculation based on the time of day - but it all runs into a problem if you view this spreadsheet after the fact - therefor reporting an incorrect value.

Does this even make sense?

Any help is greatly appreciated!

~ Geekamo
Talk-Time-Calculator.xls
0
Comment
Question by:Geekamo
  • 3
  • 2
6 Comments
 
LVL 39

Expert Comment

by:als315
ID: 38769479
You can use this for cell C16:
=C17/(MIN(N2;C6)-C5-C7)*60
in this case time over C6 will not be considered
0
 
LVL 39

Expert Comment

by:als315
ID: 38769481
May be you should add max(MIN(N2,C6),C5) if you start before C5:
=C17/(MAX(MIN(N2,C6),C5)-C5-C7)*60
0
 
LVL 1

Author Comment

by:Geekamo
ID: 38769489
@ als315,

"=C17/(MIN(N2,C6)-C5-C7)*60" is great! It does exactly what I wanted.

And as you did notice, starting before your shift results in a negative number.  That is a problem too.

But when I use "=C17/(MAX(MIN(N2,C6),C5)-C5-C7)*60", that results in a DIV/0 error.
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 39

Accepted Solution

by:
als315 earned 400 total points
ID: 38769493
It is because C5-C5 =0. You can add some IF for time less then C5. May be IF(N2 < C5, 0, C17/(MIN(N2,C6)-C5-C7)*60)
0
 
LVL 50

Assisted Solution

by:barry houdini
barry houdini earned 100 total points
ID: 38769943
Note that if you use M2 in place of N2, ultimately, with M2 = NOW() then you might experience problems because NOW() also contain the current date (as well as time), however M2 is formatted - that will cause problems when you compare with C6. It might be a good idea to adjust your M2 formula to show the current time excluding the date, i.e.

=NOW()-TODAY()

M2 will look the same as now but it will no longer contain the underlying date element that can affect your calculations.

regards, barry
0
 
LVL 1

Author Comment

by:Geekamo
ID: 38785592
@ als315,

I've been able to use this formula for a couple days now, and it's working perfectly.  Thank you very much!

@ barryhoudini,

Great tip! I adjusted my formula.

Thanks again!

~ Geekamo
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now