Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

daylight savings

ResolvedVersion 2010

Adrian has attended:
Excel VBA Introduction course
Excel VBA Intermediate course
Excel Intermediate course

Daylight Savings

Hi

I am trying to calculate the number of hours between 2 dates. I am using the below formula, however it does take in to consideration UK daylight savings time (march and October). Could someone help suggest a way off calculating this?

D1 is the 1st Date ie 01/02/2016

D2 is the 2nd Date ie 31/03/2016

=((D1+E1)-(A1+B1))*24

RE: Daylight Savings

Sorry

A1 is the 1st Date
B1 is the time for the 1st date


D1 is the 2nd Date
E1 is the time for the 2nd date

RE: Daylight Savings

Hi Adrian,

Thank you for the forum question.


That was an interesting question.


Please have a look at the attached workbook.



Kind regards

Jens Bonde
Microsoft Office Specialist Trainer

Tel: 0207 987 3777
Best STL - https://www.stl-training.co.uk
98%+ recommend us

London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector

Attached files...

calc hours daylight saving.xlsx

RE: Daylight Savings

Jens

That's absolutely brilliant, thank you so much. Could you please just briefly explain how the formula is working.

Kind regards

Adrian

Excel tip:

Convert Text to Columns in Excel 2010

If you have a cell in your Excel spreadsheet that contains a lot of text and you want to divide it into separate columns, this can only be done if there is a logical character which separates the text, for example, a comma.

Select the cells you would like to convert. On the Data tab, click Text to Columns. Choose the format of your current data.

Select Delimited if the text contains a logical character otherwise select Fixed Width if there are a certain number of spaces between each field.

Click Next when a preview of the data appears. Then select the type of character that separates the various fields. If the character is not listed, select Other and enter the character.

Click Next again and then choose the format for each of the columns. Select the column heading in the Data preview and then select a data type from the Column data format options.

Click Finish and the text will appear in several columns.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.