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

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
why don't you count Col A instead?
 
Upvote 0

Forum statistics

Threads
1,214,812
Messages
6,121,704
Members
449,048
Latest member
81jamesacct

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