Solved

Time calculation

Posted on 2015-01-23
3
52 Views
Last Modified: 2015-01-27
I have attached a spreadsheet with a formula which I cannot get to work.

cells in column B have a time already keyed in. E generates the time when the box in D is ticked. I then have a formula in cells in column G that say =IF(E2="","",IF(E2>B2,"Y","N"))

But it does not return correct answer.

Appreciate any help with this

Thanks
Time.xlsm
0
Comment
Question by:Jagwarman
3 Comments
 
LVL 24

Accepted Solution

by:
Phillip Burton earned 500 total points
ID: 40566161
Change

=IF(E2="","",IF(E2>B2,"Y","N"))

to

=IF(E2="","",IF((E2-INT(E2))>B2,"Y","N"))
0
 

Author Comment

by:Jagwarman
ID: 40566183
Brilliant thanks
0
 
LVL 32

Expert Comment

by:Rob Henson
ID: 40566192
Your time in E includes a date portion so E will always be greater than B as a result.

Phillip has given you the right answer but if you understand how date and times work in Excel it may be easier to fathom out for yourself in future.

Dates are represented by an integer number of number of days since 01/01/1900 which happened to be a Sunday and is Day 1.

Times are represented by a portion of a day ie Midday would be 0.5 or halfway through a day, 6 in the morning = 0.25, 6 in the evening = 0.75.

Therefore, midday today would be represented by a serial number of 42,027.5 eventhough you can format the cell to show "23 Jan 2015 12:00".

Knowing that dates and times behind the scenes are dealt with as numbers, it makes the maths a lot easier.

In your example, you have 12:00  (number value of 0.5) and 11:52 (number value of 42,027.49 because it includes the date portion) so the 11:52 is greater than 12:00 because of the date part, hence the result of "Y".

Hope that helps
Rob H
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Search Workbook, then move rows to new sheet 13 31
Match formula returns N/A 5 25
Excel Formula 4 28
Excel - find text within text? 1 21
Sparklines have been introduced with Excel 2010 and are a useful tool for creating small in-cell charts, used for example in dashboards. Excel 2010 offers three different types of Sparklines: Line, Column and Win/Loss. What it does not offer is a…
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…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

919 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

16 Experts available now in Live!

Get 1:1 Help Now