Count number of cells under a certain period of time in y m d format

sbafw

New Member
Joined
Sep 29, 2020
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hello, I'm looking to count the number of times a value is under a certain period of time (in this case, two years). The tricky part for me is that I'm trying to count cells populated with a "#y #m #d" format from a DATEDIF formula.

Example below:

chrome_sy74sBmWRw.png


DATEDIF formula used in B2 and copied down:
Excel Formula:
=DATEDIF(A2,TODAY(),"y") & "y " & DATEDIF(A2,TODAY(),"ym")&"m " & DATEDIF(A2,TODAY(),"md") & "d"

Trying to get C2 to show "2" in this example, but I don't know how to do it with the "#y #m #d" format in column B. Any help would be appreciated.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

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