Solved

IF statement using Time

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Macro to change number to Month in Excel? 10 45
VBA to Delete the Filtered Rows in an Excel Table 3 32
Turn date into age 17 32
Import text from rows into columns? 12 36
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.
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…
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 will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

856 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