 Highlighted

# Help with a tricky formula

I'm trying to set up a formula that will add a certain number of days to a date in one cell based on a text value in another cell.

For e.g if A1 = today's date and B1 = "quarterly", then I want C1 to show +90 days from the date in A1
If the text in B1 is "annual", then I want C1 to show +365 days from A1.

I can't seem to get it right so if anyone can help I'd be really grateful - thank you!
2 Replies
Highlighted

# Re: Help with a tricky formula

In C1:

=A1+IF(B1="quarterly",90,IF(B1="yearly",365,0))

In this example, the formula will return the same date as A1 if B1 is neither "quarterly" nor "yearly".

You can change the number 0 near the end of the formula if you want something else - for example 30 for an increase of a month, or 7 for an increase of a week.

Highlighted

# Re: Help with a tricky formula

Thank you so much, that has done the trick! I was putting the 'if' in the wrong place. Thank you again, I really appreciate your help.