Count instances of dates across range of cells (not cells which contain dates)

ellison

Active Member
Joined
Aug 1, 2012
Messages
356
Office Version
  1. 365
Platform
  1. Windows
Hi, we are trying to tidy up some data and are trying to count instances of dates across a range of cells.
Previously we counting cells which contain dates (using countif as below) but there was lots of info not being captured.
Is it possible to find a way of doing this?

It may be worth me saying that one of the challenges we have is that some of the cells contain over 255 characters which can cause some formulas / macros to fall over
(PS we are trying to put some controls in place to stop the info cells being so long, but that's for the future! )


rowInfo-1Info-2Info-3Info-4Info-5Count-Cells-FormulaNotes
2redblue11/06/2023 sold 10/11/2023 sold11/06/2023 bought 11/06/2023new source needed 11/06/20233 cells = COUNTIF(B2:F2,"*/??/*")5 occurrences of dates, sometimes dates are in the middle of a cell
3Essex11/06/2023 herts 11/06/2023 move11/06/2023 essex3 cells = COUNTIF(B2:F2,"*/??/*")3 occurrences of dates, sometimes there are blanks in the info
411/06/2023 herts11/06/2023 herts3 cells = COUNTIF(B2:F2,"*/??/*")2 occurrences of dates, sometimes there are duplicates in the info
5111/06/20233 cells = COUNTIF(B2:F2,"*/??/*")1 occurrence of date, sometimes the cells in the info are numeric


Huge thanks for any help

All the best
 
Last edited:
Maybe perhaps could it be added into the cell formula to work on the "first" 243 characters?
 
Upvote 0

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Is there are a different workaroud maybe?
Not highly tested, but how does this go in H2, copied across and down?

Excel Formula:
=LET(s,CONCAT(IF(ISNUMBER($B2:$F2),TEXT($B2:$F2,"dd/mm/yyyy"),$B2:$F2)),(LEN(s)-LEN(SUBSTITUTE(s,TEXT(H$1,"dd/mm/yyyy"),"")))/10)
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
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