mark east

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

Forum home » Delegate support and help forum » Microsoft Excel Training and help » Mark East

Mark East

resolvedResolved · Medium Priority · Version 2003

Selina has attended:
Excel Intermediate course

Mark East

When calculating the difference between two dates (possibly over more than a year), how do I show the result as a number of Months? Also can this be done as a formula to include today's date as the latter of the two dates?

RE: Mark East

Hi Salina

If cell A1 is date from last year and cell A2 is current date you would do the formula as follows:
In cell A3 you would do a subtraction of the 2 cells and then format the cell as a number. This would give you number of days so we could make it a monthly figure by dividing by 30. Your formula would look like this:
=SUM(B1-A1)/30
Ensure that you have formated the cell as a number.

This cell would round at the moment and for your purposes you would want excel to always round down and never up. So you will need to do a further formula in cell D1 to force a round down. our formula would look like this =ROUNDDOWN(C1,0)

Hope that helps.
David


 

Excel tip:

Hide data in Excel Worksheets

Let's say you have some data in cell 'C5' you would like to hide from the casual viewer.

Click cell 'C5' to select it.

Click the 'Format' menu, select 'Cells'. When the 'Format Cells' dialogue box opens, click the 'Numbers' tab (if necessary), then select 'Custom' from the 'Category' list.

Double-click the 'Type' entry box and type three semi-colons: ";;;"

Click 'OK' to close the dialogue box and accept the new formatting.

The data in cell 'C5' disappears. It's still there and will work in calculations, but it isn't visible.

If you need to check the data, just click the blank cell and the contents appear in the 'Formula bar'.

View all Excel hints and tips


Server loaded in 0.09 secs.