Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Formula Revision

Posted on 2013-01-11
6
Medium Priority
?
281 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 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 40

Accepted Solution

by:
als315 earned 1600 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 400 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

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.
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

926 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