Excel Date Filter not grouping dates - excel

I am pulling data from another spreadsheet and have a filter on the column header. The dates range from 2015 to 2018 off all months, weeks and days. Some of the dates are not grouping e.g. 15/03/2018 is loose underneath the 2018, 2017, 2016 and 2015 collapsible boxes.
All dates has come from the same source spreadsheet and the Marco formats them all as did/mm/yyyy when copying over.

Highlight the dates, and go to data -> Text to columns -> OK
Worked for me

I have found the formula DATE(YEAR(a1),MONTH(a1),DAY(a1)) will translate both strings that look like dates and actual dates into a date format.
Filtering and sorting behavior should then be consistent down the column.

I solved a similar problem by copying the column to notepad, and reinserting it. After this all dates were in the same format.

Make sure Excel recognizes the whole column as a set of dates.
Grouping requires all cells to be formatted as dates. Grouping will only work if there are no empty or text cells in a range and all cells have the same date format.
You may try the following steps to correct number format in the range:
remove any number formats (Home -> Clear -> Clear Formats...). After this step your date values shall look like numbers (e.g. 43284, 43285 etc.)
(optional) multiply the whole range by 1 (Copying "1" from a single cell and using "Paste Special"). This step effectively converts all cell formats to numeric
(optional) use filter to check if there are any empty / text cells left and fill them with numeric values (e.g. zeroes)
finally, apply the date format (Home -> Number -> Long Date)

Related

Excel file has mixture of dates as text and serial numbers

I've gotten an Excel file in which some of the dates are actually serial dates (42741, 42800, etc.), and some are just text. Since the serial dates are formatted as dates, they all look alike, but Excel can't correctly sort them, and displays them as spanning a year instead of the two month period they actually represent.
To make things worse, the dates are formatted in the US style (mm/dd/yyyy), and my system uses the International (dd/mm/yyyy).
How do I clean this data!?
lets pretend your dates are in Column A place the following in an adjacent column and copy down accordingly.
=IF(ISNUMBER(A2),L7,DATE(RIGHT(A2,4),LEFT(A2,2),MID(A2,FIND("/",A2)+1,2)))
Alternative use TEXT to Column built in function in the ribbon.
1) Select your range of mixed dates
2) Select Text-to-Columns
3) Keep selecting next until you come to the page after selecting delimiters
4) Choose your destination location (default is overnighting your data)
5) Select the column header in the preview
6) Select the Date radio button for format
7) Select the date format that matches the source format
Serial dates will remain unchanged, and text dates will be converted.
After much grief, this is the method that worked for me. I hope it might help others!
Add a length column, containing =LEN(your date). The serial dates will have 5 characters, while the text ones will have 7. Sort by length.
Filter for the 5-length (serial) dates, and copy them to an adjacent
column.
Use the text-to-column feature on these cells. Separate by
delimited, under delimiters choose other, and type "/" (or ".", if
relevant). Hit finish.
In an adjacent column, use the DATE function to reconstitute your
date, month, year pairs into a date. (Note that if your year just
says, say, "17", Excel will assume it to be 1917, so either add the
leading "20" or hard-code it.)
Now, do a similar process with your 7-digit dates - copy them, split
by "/", (or "."), recombine into dates.
Copy your new dates back to their original slots and format them as
"Short date". Et voilĂ ! Excel now recognises them as dates. You can
sort and filter by actual date.

Excel strange issue to recognise dates

I have problem in formating the dates. I have dates that are recorded manually in dd.mm.yyy format. i have converted them to dd/mm/yyyy format using Left, right and Mid functions. The problem is that excel is able to identify only some cell values as dates and rest as text. I have also tried selecting the whole date range and convert to date. But when i apply filter the dates that are not recognised by excel are shown separately and the remaining under 2015 & 2016 years.
I need all the values to be converted and identify in excel. I am attaching screen shots of the same issue
Date different format
From the picture the row range from 23 to 28 in 2nd column is identified as date and row 29 to 34 is displayed as text. When i apply filter in second column, the date is shown as in below format
Filter issue
#Rejendra, I thing the problem you are having is that your computer is thying to evaluate the dates in american format e.g MM/dd/yyyy.
If you convert the date to yyyy-MM-dd using left right and mid functions and the excel formula =DATEVALUE it should work
If your computer is set to non US format you could simply use:
=DATEVALUE(SUBSTITUTE(A1,".","/"))
to convert it where A1 is the cell with the . delimited dates

Excel date conversion and grouping

I have 20 years of week dates and their corresponding values. The date format is yyyy-mm-dd (the data is not in date format but just in this format on excel), and each of this has a corresponding value. I need to find daily, weekly, monthly, yearly averages. Since the data is too big and I can't find them manually.
Is there any way I can first convert this non-western type of date into some date types and then use some excel functions to do my calculation?
Thanks
If yyyy-mm-dd is text you should be able to convert to number by entering 1 somewhere and copying that, then selecting all the text to be converted and Paste, Paste Special..., check Multiply, OK.
You don't mention what you are averaging (a total divided by number of days/weeks/months/years involved?) but if just counting by day/week/month/year then a PivotTable should be very useful (dates for ROWS and Sum of values for VALUES), with grouping of rows to suit.

Why are date values "slipping through" a filter in Excel?

I'm cleaning data in Excel that has a date column with mm/dd/yyyy values mixed with dd/mm/yyyy values where the former are date formatted and the latter are general formatted. The way I'm doing this is to filter out everything that's date formatted (ie: shows up in the filter as 1964 -> March -> 27, etc... at various levels), leaving only those that are general formatted (shows up in the filter as as 27/03/1964). When I do this, I find that there are still date-formatted cells visible. I'm wondering why this is? Is it a consequence of how the filter works or how Excel reads date values?
I can't comment, as I don't have a rating of over 50.
I had a similar issue that you had, and realised that my dates were actually formatted as text. Setting the dates to a YYYY-MM-DD format, the cells wouldn't change unless I double clicked the cell, then clicked off of it.

Different date formats in Excel

I have a csv that contains a list of dates, once imported into Excel they are in 2 different formats. How can I get them all in the same format?
Example:
01/23/2012
01/26/2012
40910
41031
You probably have a BIG issue with your file!
Probably, Excel is recognizing dates as "dd/mm/yyyy" but your data is "mm/dd/yyyy" formatted.
So, your numbers are really dates (just format, as #t.thielemans suggested). But are incorrectly parsed - month and day are switched!
Solution (assuming your dates are on A:A column):
To convert text to date:
=DATE(RIGHT(A1;4);LEFT(A1;2);MID(A1;4;2))
To correct day/month:
=DATE(YEAR(A1);DAY(A1);MONTH(A1))
Detect whether cell has date (dates are numbers, in Excel) or text:
=ISNUMBER(A1)
Finally, all combined within one formula:
=IF(ISNUMBER(A1);DATE(YEAR(A1);DAY(A1);MONTH(A1));DATE(RIGHT(A1;4);LEFT(A1;2);MID(A1;4;2)))
Just drag last formula from first row to end of your data and then format it as you wish (see #t.thielemans solution).
Select your data column and make sure they're highlighted. Go to Home>Number and select Custom and enter mm/dd/yyyy. You can also change the layout to one you want (mm-dd-yyyy/mmddyyyy/dd-mm-yyyy/...)

Resources