Age formula

Hwatsonnn

Board Regular
Joined
Nov 14, 2018
Messages
58
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
I currently have a formula telling me the the date in which an animal reaches 16 months in age or 30 months in age, depending on whether they are a "B" or an "ST".

=IF(E3="B",EDATE(C3,16),IF(E3="ST",EDATE(C3,30)))

Would it be possible to add a function that would display a dash "-" if the B is over the 16 months of age.

As well as a something that would display "OTM", if the ST's age has gone over 30 months of age.

Help would be much appreciated! :)
 
Last edited:

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Try this:

=IF(E3="B",IF(DATEDIF(C3,TODAY(),"m")>16,"-",EDATE(C3,16)),IF(E3="ST",IF(DATEDIF(C3,TODAY(),"m")>30,"OTM",EDATE(C3,30))))
 
Upvote 0
Try this:

=IF(E3="B",IF(DATEDIF(C3,TODAY(),"m")>16,"-",EDATE(C3,16)),IF(E3="ST",IF(DATEDIF(C3,TODAY(),"m")>30,"OTM",EDATE(C3,30))))

This is perfect thanks, I lowered the 16 to 15 and 30 to 29 to discount animals which are over 16 but less than 17. This will help greatly, thanks again.
 
Upvote 0
I'm glad to help you. Thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,552
Messages
6,120,172
Members
448,948
Latest member
spamiki

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top