COUNTIFS dates match, dates as numeric but in text cell with many other numbers

Lanz

New Member
Joined
Jun 9, 2010
Messages
5
Hi, again thanks for previous help, I would not ask had I not tried several times already, but my new question is this:

I have a column listed as the ID tag for a dataset. This column has a large number for every row, with numbers representing different values of the identification, and formated as text (by default because import procedures require this to get true values).
e.g. 1023419990516004
-Where 10234 is the agent #, 19990516 is the date (year, month, date), and 004 is the survey # for that day for that agent.

I have made previous template keeping the stats locked and can drag and drop datasets to get different statistics without manipulating columns. My hope is to extract the date, or rather use COUNTIFS the cells meet a date range (season) without creating a new column that extracts these values.
e.g. =countifs(sheet!range:range,">=....19990320...,sheet!range:range,"<=....19990620...,sheet!rang:range,(other criteria)).

Anybody have an idea on how to do this or if this is possible without formatting column as number? If not, what would I place in the format code to extract this date? Thanks
 

Some videos you may like

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
55,413
Office Version
  1. 365
Platform
  1. Windows
Let's say that your value is in cell F3. You can use this formula to extract the date:

=DATE(MID(F3,6,4),MID(F3,10,2),MID(F3,12,2))
 

AlphaFrog

MrExcel MVP
Joined
Sep 2, 2009
Messages
16,358
Would something like this work?
Excel Workbook
ABCD
1IDStart DateEnd DateCount
210234199905160005/17/19995/19/19993
31023419990517000
41023419990518000
51023419990519000
61023419990520000
Sheet
 

Lanz

New Member
Joined
Jun 9, 2010
Messages
5
Thank you both for the quick reply. Joe thanks for the code. AlphaFrog's function looks as if it will allow additional columns in the stats sheet, which is fine so long as none are added to dataset, and just what I needed. I will try it and let you know how it worked..
Thank you so much.
 
Last edited:

Watch MrExcel Video

Forum statistics

Threads
1,118,401
Messages
5,571,910
Members
412,425
Latest member
MalCorn
Top