@silvy
It's not enough to say just "thanks". You have to take some effort to do something.
If it is a homework, I will try help you with this example but you need learn Excel.
So you have two conditions
- <=2009
- >2009
If the first condition is met you add 45 days, to Date from the 'B' column
If the first condition is not met you add 60 days to Date from 'B' column
As @Logit said it is necessary to use the Excel IF function.
Why?
Because this Excel function is basically based on one condition (or two conditions). In fact, it is based on TRUE or FALSE.
The formula would be the following:
Code:
=IF(F4<=2009;B4+45;B4+60)
The Syntax IF function has the following arguments
Code:
=IF(logical_test;value_if_true;value_if_false)
or
=IF(1st_argument;2nd_argument;3rd_argument)
or
=IF(condition;ResultIfConditionMet;ResultIfConditionNotMet)
The first argument, the IF function is '
logical_test'. For the first argument you set the first condition ie 'F4 <= 2009', because in the 'F' column are the years that are your condition.
In this case, you have 2001 in F4. So the first condition is met.
The second argument, the IF function is '
value_if_true'.
So, if the condition from the first argument, in the 'F' column is satisfied, then the IF function should return the result from the second argument.
In the translated sense, this means that if the condition from the first argument is met, the result should be Date in B4 + 45 days. So, 01.02.2015 + 45 days
If the condition from the first argument is not satisfied,then the IF function should return the result from the third argument ie your other condition or Date to B4 + 60 days'.
The third argument, the IF function is '
value_if_false'. Instead of this argument I put "B4 + 60". So if the year in 'F4' cell is higher than 2009 then IF function as the final result will return the third argument IF function.
Always put the formula in the first Row/Cell and copy as necessary down or right. Keep in mind the
absolute and relative addresses in the formula, because they often depend on the result of copying the formula.
I hope I have somehow managed to explain to you how the IF function works. So
learn the basics of Excel and study
Excel functions.
Good luck learning Excel.
Sorry for my bad english.