Solved

Time calculation

Posted on 2015-01-23
3
51 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 31

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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 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 in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

757 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

22 Experts available now in Live!

Get 1:1 Help Now