Solved

Formula Revision

Posted on 2013-01-11
6
264 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 40

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 40

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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
LVL 40

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

751 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