Locating specific dates in a column

datadummy

Active Member
Joined
Mar 16, 2017
Messages
313
Office Version
  1. 365
Platform
  1. Windows
I am trying to write a formula that will reference a column and give me a count of all cells that have the specified year in them. Example column H will various years worth of data in this format 1/01/2017 and I am attempting to get counts of each years total, so month and day are pretty much irrelevant.
 
So I entered both equations and got 2 separate results neither of which were the 4999. I tried highlighting all the cells and changing the format to Date but the results didn't change. I also filtered out any blanks or other formats that appeared in the column, but there are still blank cells that are appearing in the column. Any thoughts?
 
Upvote 0

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Sorry, I have been away for a while.

I tried highlighting all the cells and changing the format to Date but the results didn't change.
That is not enough to convert text entries to date entries. Changing the format only works on cells that are already entered as numbers or dates. It does nothing to text entries.
You would need to use Text to Columns to do that.

Can you please answer the questions I asked in my previous post?
What did the two formulas I posted return?
 
Last edited:
Upvote 0
To answer your questions regarding the formulas. The first formula {=SUM(IF(ISNUMBER('GC Card Tracking'!H24:H3670),1))} it returned 1154. The second formula =COUNTBLANK('GC Card Tracking'!H24:H3670) returned 2472. I'm some what at a loss on this and have resorted to filtering out the years and blanks and just getting a total count with the ones that are populated.
 
Upvote 0
If you add up 1154 and 2472, that returns 3626.
If you count from row 24 to row 3670, that returns 3647.
So there are 21 rows unaccounted for, presumably text entries.

Let's see if we can find the problem cells.
On your 'GC Card Tracking' sheet, pick some blank column, and place this formula on row 24 and copy down to row 3670:
Code:
=IF(OR(ISNUMBER(H24),COUNTBLANK(H24)=1),"","PROBLEM HERE!")
Then inspect the column. Any row that returns "PROBLEM HERE!" is a problem, as that indicates it is non-blank, non-numeric (and hence non-date) entry.
 
Last edited:
Upvote 0
If you add up 1154 and 2472, that returns 3626.
If you count from row 24 to row 3670, that returns 3647.
So there are 21 rows unaccounted for, presumably text entries.

Let's see if we can find the problem cells.
On your 'GC Card Tracking' sheet, pick some blank column, and place this formula on row 24 and copy down to row 3670:
Code:
=IF(OR(ISNUMBER(H24),COUNTBLANK(H24)=1),"","PROBLEM HERE!")
Then inspect the column. Any row that returns "PROBLEM HERE!" is a problem, as that indicates it is non-blank, non-numeric (and hence non-date) entry.

That worked! It found each cell in column H that was non-date. That was freaking cool, thanks for the help locating the problem cells this was awesome I totally appreciate the help!!!
 
Upvote 0
You are welcome!
I am glad I was able to help you out.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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