I need to read the date portion of a Dymamic field as a date.

USAMax

Well-known Member
Joined
May 31, 2006
Messages
843
Office Version
  1. 365
Platform
  1. Windows
I have a field that I import with a date. Here is some sample data:
2012-11-05 rev. 003
2012-11-01 rev. 002
2012-11-09 rev. 009
2012-11-12 rev. 021
2012-11-20 rev. 022
2012-11-20 rev. 022
2012-11-17 rev. 005

I need to keep this field as it is and be able to report number of values that are older than 7 days so I created another column CA that reformats this data so it looks like this:
11/05/2012
11/01/2012
11/09/2012
11/12/2012
11/20/2012
11/20/2012
11/17/2012

The problem is that although these look like dated they are only text so this formula =COUNTIF(CA:CA,"-(=TODAY())>7") does not work.

I am good at VBA but I would rather keep this on the sheet. Any ideas?
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
You can retrieve actual dates using the below formula:
=DATE(LEFT(A1,4),MID(A1,6,2),MID(A1,9,2))
 
Upvote 0
That is perfect, the dated are now showing up as dates and I can verify it by changing the date format for the field. THANK YOU

My COUNTIF formula is still not showing dates in this field that are older than 7 days. =COUNTIF(CA:CA,"-(=TODAY())>7")

Can you help with this?
 
Upvote 0
Not quite sure which dates you're trying to count. This will count any that are greater than TODAY()-7
=COUNTIF(CA:CA,">"&TODAY()-7)
 
Upvote 0
Not sure I get the quotes around the > but it worked!

Thank you so much and I wish you a very happy Thanksgiving!
 
Upvote 0

Forum statistics

Threads
1,216,115
Messages
6,128,923
Members
449,478
Latest member
Davenil

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