Solved

IF statement using Time

Posted on 2014-01-08
3
123 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 80

Accepted Solution

by:
byundt earned 250 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 80

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

746 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

12 Experts available now in Live!

Get 1:1 Help Now