?
Solved

IF statement using Time

Posted on 2014-01-08
3
Medium Priority
?
142 Views
Last Modified: 2014-01-08
This is probably really basic but I can't for the life of me get this to work.  I have 2 cells that contain a date and a time, cell a and B.  In order to calculate duration I have added these two cells together and formatted the cells as [h]:mm:ss.  I would now like to calculate the percentage of calls that were made in 15 mins or less.  My formula is =If(c2<0:15:00,1,0).

What am I missing here?
0
Comment
Question by:Rrave26
  • 2
3 Comments
 
LVL 81

Accepted Solution

by:
byundt earned 1000 total points
ID: 39766747
A duration suggests that you have two cells with date/time information and are looking at their difference. To see if it is less than 15 minutes, consider:
=IF(B2-A2<=TIME(0,15,0),1,0)

If the above discussion is not solving your problem, could you please post a sample workbook so the discussion can be specific to your situation?
0
 
LVL 81

Expert Comment

by:byundt
ID: 39766763
You can calculate the percentage of differences that are 15 minutes or less with a formula like:
=SUMPRODUCT(((B1:B30-A1:A30)<=TIME(0,15,0))*(A1:A30<>0)*(B1:B30<>0))/SUMPRODUCT((A1:A30<>0)*(B1:B30<>0))
0
 

Author Closing Comment

by:Rrave26
ID: 39766806
That worked perfectly.  Thanks.
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 article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

840 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