Date/Edate

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My worksheet contains a column (C) with either "annual" or "semi-annual". The
next column (D) contains a start date. The following column (E) has an end
date. In this end date column, I need to come up with a formula that checks
the date in the "start date" column, and adds either 6 months or 12 months to
the date depending upon if "annual" or "semi-annual" is in the first column.

I tried entering this into E5 this but it doesn't work:

=IF(C5="Annual","=EDATE(D5,12)","=EDATE(D5,6)")

Is there some other way to do this? I'm new to Excel so any help would be
appreciated.

Thank you.
 
Hi

=EDATE(D5,((C5="Annual")+1)*6)

When this doesn't work, check your dates - maybe they are in ivalid format
or text strings.
 
=EDATE(D5,(C5="Annual")*12+(C5="Semi-Annual")*6)

or

=EDATE(D5,IF(C5="Annual",12,IF(C5="Semi-Annual",6,0)))
 
Hi!

Try this:

=IF(C5="Annual",EDATE(D5,12),EDATE(D5,6))

Also note that the EDATE function requires that the Analysis Tool Pak add-in
be loaded.

Your formula doesn't work because of the extra quotes " ".

If you enter the formula as I show and you get a #NAME! error that means the
Analysis Tool Pak add-in is not loaded.

To check it, goto Tools>Add-Ins

Biff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top