Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Formula Revision

Posted on 2013-01-11
6
Medium Priority
?
278 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
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

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.

Question has a verified solution.

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

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

721 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