date calculation

Forum home » Delegate support and help forum » Microsoft Excel Training and help » Date Calculation

Date Calculation

resolvedResolved · High Priority · Version 2010

Euon has attended:
Excel Advanced course
Excel VBA Introduction course
Excel VBA Intermediate course
Excel VBA Advanced course

Date Calculation

I have a list of cutoff dates and would like to provide a date automatically based on whether a start date is less than or equal to any cutoff date. If I am able to provide an attachment, this would be a lot easier to understand?

The formula that I have is =IF(E6<="31/01/2013",AH6,IF(E6<="31/07/2013",AH7,IF(E6<="31/10/2013",AH8,IF(E6<="31/01/2014",AH9,IF(E6<="30/04/2014",AH10,IF(E6<="31/07/2014",AH11,IF(E6<="31/10/2014",AH12,IF(E6<="15/02/2015",AH13,IF(E6<="30/04/2015",AH14)))))))))

However, it only seems to aleays return the 1st date i.e. 31/01/2013 for every cell. I want this to vary depending on whether the start date falls before or on that day.

Please help

RE: Date Calculation

Hi Euon,

Thank you for your post. I just ran a similar formula and it seemed to work fine. It might be a good idea to send us an attachment so that we can check for other issues which might be causing the problem.

You can send the attachment to forum@stl-training.co.uk

Kind regards
Marius Barnard
Excel Trainer

RE: Date Calculation

Hi Euon,

Apologies for only responding now, I've been snowed under with training over the past two weeks. I have attached the Excel file you sent, with some changes to the formula. The IF function works better with dates if you put them in separate cells and then link them into the IF function, as I've done on the sheet.

I hope this helps.

Kind regards
Marius

Attached files...

Date Calculation Example.xlsx

RE: Date Calculation

Hi Marius,

Ah, this is perfect. The solution was so simple!

Thank you for your response.

Regards,

Euon


 

Excel tip:

Hide columns in an Excel 2010 Worksheet

If you don’t want part of the Excel worksheet to be visible or when you don’t want certain data to appear in print outs, then a simple solution is to temporarily hide a column or multiple columns.

Hiding a single column:

1)Right click on the column header of the column you want to hide (this is the grey bar along the top edge of the worksheet)
2)Choose Hide from the menu
3)This column will now be hidden from view

Hide more than one column:

1)In the column header drag select to highlight the columns you want hidden
2)Right click and choose Hide from the menu

View all Excel hints and tips


Server loaded in 0.58 secs.