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.
 

Some videos you may like

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

AlanY

Well-known Member
Joined
Oct 30, 2014
Messages
4,238
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
why don't you count Col A instead?
 

Watch MrExcel Video

Forum statistics

Threads
1,122,518
Messages
5,596,621
Members
414,081
Latest member
Subaru_Steve

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
Top