Help with a tricky formula

%3CLINGO-SUB%20id%3D%22lingo-sub-1535744%22%20slang%3D%22en-US%22%3EHelp%20with%20a%20tricky%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1535744%22%20slang%3D%22en-US%22%3EI'm%20trying%20to%20set%20up%20a%20formula%20that%20will%20add%20a%20certain%20number%20of%20days%20to%20a%20date%20in%20one%20cell%20based%20on%20a%20text%20value%20in%20another%20cell.%3CBR%20%2F%3E%3CBR%20%2F%3EFor%20e.g%20if%20A1%20%3D%20today's%20date%20and%20B1%20%3D%20%22quarterly%22%2C%20then%20I%20want%20C1%20to%20show%20%2B90%20days%20from%20the%20date%20in%20A1%3CBR%20%2F%3EIf%20the%20text%20in%20B1%20is%20%22annual%22%2C%20then%20I%20want%20C1%20to%20show%20%2B365%20days%20from%20A1.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20can't%20seem%20to%20get%20it%20right%20so%20if%20anyone%20can%20help%20I'd%20be%20really%20grateful%20-%20thank%20you!%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1535744%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ENeed%20Help%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1535764%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20with%20a%20tricky%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1535764%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F735003%22%20target%3D%22_blank%22%3E%40Sazzles%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20C1%3A%3C%2FP%3E%0A%3CP%3E%3DA1%2BIF(B1%3D%22quarterly%22%2C90%2CIF(B1%3D%22yearly%22%2C365%2C0))%3C%2FP%3E%0A%3CP%3EIn%20this%20example%2C%20the%20formula%20will%20return%20the%20same%20date%20as%20A1%20if%20B1%20is%20neither%20%22quarterly%22%20nor%20%22yearly%22.%3C%2FP%3E%0A%3CP%3EYou%20can%20change%20the%20number%200%20near%20the%20end%20of%20the%20formula%20if%20you%20want%20something%20else%20-%20for%20example%2030%20for%20an%20increase%20of%20a%20month%2C%20or%207%20for%20an%20increase%20of%20a%20week.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1535812%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20with%20a%20tricky%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1535812%22%20slang%3D%22en-US%22%3EThank%20you%20so%20much%2C%20that%20has%20done%20the%20trick!%20I%20was%20putting%20the%20'if'%20in%20the%20wrong%20place.%20Thank%20you%20again%2C%20I%20really%20appreciate%20your%20help.%3C%2FLINGO-BODY%3E
Highlighted
New Contributor
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

@Sazzles 

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
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.