Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-18-2021, 11:36 AM
geobar geobar is offline Persistent problem with date formatting Windows 10 Persistent problem with date formatting Office 2007
Novice
Persistent problem with date formatting
 
Join Date: Jan 2018
Posts: 5
geobar is on a distinguished road
Default Persistent problem with date formatting

6-18-2021

This is an extremely elementary question but that's the level at which I work: Please see the small attached spreadsheet "Abbreviated Excel spreadsheet.xlsx"

This is just the first few rows of a longer spreadsheet downloaded from my bank of an Excel file showing the transactions in a credit card account with that bank which occurred a short time ago. It was originally downloaded as as .csv file which I then saved as a .xlsx file and in that format manipulated it a little further Excel Office 365.

Please see the first column headed "Date" showing the date of these few transactions, all in May, 2021. Every single date appears in the format dd/mm/yyyy-- they appear as 05/18/2021, 05/22/2021 and 05/25/2021. There are dozens more such identically formatted dates in the larger complete spreadsheet which I downloaded from the bank.

NO MATTER WHAT I DO, I CANNOT GET THIS FORMAT TO CHANGE. I WOULD PREFER NOT TO SHOW THE INITIAL ZERO. I follow the usual instructions: after selecting this column-- I go to HOME--> Number-->click on the small box at the lower righthand corner of that window-->CUSTOM and see the list of different available formats. NO MATTER WHICH ONE I CHOOSE, NO CHANGE OCCURS IN THE APPEARANCE OF THE CELLS IN THE DATE COLUMN(???). ALTERNATIVELY, IF I CHOOSE HOME-->


NUMBER--> DATE-->AND THEN SELECT FROM THE SHORTER LIST OF DIFFERENT FORMATS, AGAIN NO CHANGE OCCURS WITH ANY OF THE OPTIONS CHOSEN.

At first I thought the problem might be that I had inadvertently managed to "lock" the cells and prevented formatting from being changed. As best I can tell, nothing is locked. What don't I understand about this process that absolutely no change in these cells occurs according to expectation from instructions given in multiple online help articles and youtube video clips? But in addition, what is the difference between these two different ways of trying to format dates? Assuming both happened to work, which one is preferable?

Whoever responds, please understand this is not merely a cosmetic issue. If I leave the date format alone and try to paste the Excel spreadsheet as it stands into a QuickBooks page designed to allow me to load the transactions from the Excel file into my QuickBooks account ledger(s), the paste fails and messages appear saying that the date format is incorrect.

Lastly, can anyone explain why the first date listed in that column is not aligned with the dates of the two transactions immediately below it? The two lower transactions stay together when I ask for right-justification, left-justification or centering of the column. But the first of the three transactions always moves independently of the other two, even after I line it up by hand with the two lower transactions: It will remain centered with them, but it will not be aligned in any other justification choice.

This oddity occurs only in the date column and only in the first row of data in any download of an Excel file from my bank. And not elesewhere. Why?

What gives?

Thanks.

geobar.
Attached Files
File Type: xlsx Abbreviated Excel spreadsheet.xlsx (11.4 KB, 7 views)
Reply With Quote
  #2  
Old 06-18-2021, 12:45 PM
Purfleet Purfleet is offline Persistent problem with date formatting Windows 10 Persistent problem with date formatting Office 2019
Expert
 
Join Date: Jun 2020
Location: Essex
Posts: 345
Purfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to behold
Default

Column A is text with non printable characters and spaces, then it is also in US format (maybe a setting in Excel or your bank).

I would add another column with the below formula

=MID(TRIM(CLEAN(A2)),4,2)&"/"&MID(TRIM(CLEAN(A2)),1,2)&"/"&MID(TRIM(CLEAN(A2)),7,4)

then in the next column add zero to make it a number

Probably can be done in Power Query but i have hardly ever used PQ
Attached Files
File Type: xlsx Abbreviated Excel spreadsheet_ar12.xlsx (17.5 KB, 6 views)
Reply With Quote
  #3  
Old 06-18-2021, 01:10 PM
geobar geobar is offline Persistent problem with date formatting Windows 10 Persistent problem with date formatting Office 2007
Novice
Persistent problem with date formatting
 
Join Date: Jan 2018
Posts: 5
geobar is on a distinguished road
Default Persistent problem with date formatting

6-16-2021


Dear Purfleet:


1. Jeez!


2. Thank you very much.


3. This is way over my head; I'm not sure which disturbs me more-- the complexity of the formula or the speed of your response with it.


4. Would you please be much more specific in offering the instruction: "then in the next column add zero to make it a number"--when you say "in the next column" are you speaking about a column that this formula will create which does not exist before the formula acts upon the given Date column? This is a little confusing-- you first ask me to create a blank column (I assume to the right of the existing Date column) and then speak of "in the next column" which as the spreadsheet stands now contains information describing the payee for the transactions-- I'm sure you don't mean add a zero to any of those cells. You must mean add a zero to data that will appear in the initially blank column just created to the right of the Date column, don't you? And where exactly will that zero be "added" in each cell? "Added" how? To the very end of whatever digits are displayed in that column?


You see the difficulty I have visualizing this.


5. Are you absolutely sure there is no simpler way to convert the text information in the Date column to numerical information on which Date formatting can act?


Many thanks. I'm most impressed.


geobar
Reply With Quote
  #4  
Old 06-18-2021, 01:21 PM
Purfleet Purfleet is offline Persistent problem with date formatting Windows 10 Persistent problem with date formatting Office 2019
Expert
 
Join Date: Jun 2020
Location: Essex
Posts: 345
Purfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to behold
Default

Did you see the example in the attached worksheet?

I put the formula in column E, then in column F i have added zero to make the date. you can then copy this column and paste special > values and formats back in column A and delete the formulas

re point 5 - this is how i would do it, but if i have learnt anything about Excel its that there will be 5 or 6 ways to to it
Reply With Quote
  #5  
Old 06-21-2021, 03:40 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Persistent problem with date formatting Windows 7 64bit Persistent problem with date formatting Office 2010
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,771
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Another possibility
To clean "dirty" data, you can use
Code:
=TRIM(CLEAN(SUBSTITUTE(A2,CHAR(160)," ")))
in col E
and to make it real dates in col F
Code:
=DATE(RIGHT(E2,4),LEFT(E2,2),MID(E2,4,2))
and pull down


you can skip the second step this way :

- copy results of col E
- Paste values somewhere say col F
-select the range in col F
-Select Data Text to columns - Next - Next
- In the last window set the date format to MDY and click Finish - If results are right aligned you're good
( Can't say this is much easier... :-))))
Reply With Quote
  #6  
Old 06-21-2021, 03:42 AM
Purfleet Purfleet is offline Persistent problem with date formatting Windows 10 Persistent problem with date formatting Office 2019
Expert
 
Join Date: Jun 2020
Location: Essex
Posts: 345
Purfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to behold
Default

Isnt that the same as mine but in 2 cells? Just wondering if it was easier
Reply With Quote
  #7  
Old 06-21-2021, 11:49 PM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Persistent problem with date formatting Windows 7 64bit Persistent problem with date formatting Office 2010
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,771
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

The first formula I proposed can be used in all cases where strings need to be cleaned, while yours is specific to cleaning and converting to dates at the same time.
It also introduces the technique for converting dates ( when applicable) using the Text to Columns feature

IMO, using helper columns ( created by the first formula) is much more easy when it comes to finding errors and is easier to understand

In your ( excellent) solution errors would be harder to find
A nice article on cleaning "dirty" data
Reply With Quote
  #8  
Old 06-21-2021, 11:52 PM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Persistent problem with date formatting Windows 7 64bit Persistent problem with date formatting Office 2010
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,771
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

@geobar
Please don't use uppercase in your posts unnecessarily. They are the equivalent of shouting, and as we are all friends here...
Reply With Quote
  #9  
Old 06-21-2021, 11:55 PM
Purfleet Purfleet is offline Persistent problem with date formatting Windows 10 Persistent problem with date formatting Office 2019
Expert
 
Join Date: Jun 2020
Location: Essex
Posts: 345
Purfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to behold
Default

Fair enough

I must admit that i generally use a few stages before joining it all together as it is usually a request to have a condensed version - although i agree much hard to decode
Reply With Quote
  #10  
Old 06-22-2021, 11:28 PM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Persistent problem with date formatting Windows 7 64bit Persistent problem with date formatting Office 2010
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,771
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Quote:
Originally Posted by Purfleet View Post
Fair enough

I must admit that i generally use a few stages before joining it all together as it is usually a request to have a condensed version - although i agree much hard to decode

You're right about that, and in most cases the OP does nothing but copy/paste what is proposed without learning or trying to understand how the solution works
Reply With Quote
Reply

Tags
date format problem



Similar Threads
Thread Thread Starter Forum Replies Last Post
A persistent line of small square dots johngross Word 4 02-23-2020 02:59 PM
Persistent problem with date formatting MM persistent request for seperators JLOB Mail Merge 5 01-30-2020 02:50 PM
Persistent problem with date formatting Date-formatting problem Ulodesk Excel 6 06-08-2014 02:27 PM
Persistent problem with date formatting Review > Markup. Deselect "Formatting" is not persistent OldGrantonian Word 3 02-06-2014 03:30 AM
Date formatting kjxavier Excel 0 08-10-2011 08:17 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:04 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft