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 total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
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

Forum statistics

Threads
1,223,893
Messages
6,175,239
Members
452,621
Latest member
Laura_PinksBTHFT

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