Forum Discussion
cyndiwise
Mar 17, 2024Copper Contributor
Reformatting text date doesn't work in Microsoft 365 Excel
When I copy a list of dates from a web page into an Excel spreadsheet, if the dates are formatted as text (ex. September 23, 2003) then when I try to change the date format to 9/23/2003 nothing happe...
- Mar 17, 2024
Does this work?
=LET(d,SUBSTITUTE(H122,CHAR(160)," "),DATEVALUE(TEXTAFTER(TEXTBEFORE(d,",")," ")&"-"&TEXTBEFORE(d," ")&"-"&TEXTAFTER(d," ",2)))
cyndiwise
Mar 17, 2024Copper Contributor
HansVogelaar Thanks for the response. Having never used Power Query, I'm struggling with getting the results entered into my spreadsheet correctly - but I can work around it with some effort. I tried the formula you suggested, replacing A2 with the correct Column/Row (H122) but it displays #N/A error.
HansVogelaar
Mar 17, 2024MVP
Does this work?
=LET(d,SUBSTITUTE(H122,CHAR(160)," "),DATEVALUE(TEXTAFTER(TEXTBEFORE(d,",")," ")&"-"&TEXTBEFORE(d," ")&"-"&TEXTAFTER(d," ",2)))
- cyndiwiseMar 17, 2024Copper ContributorYes, thank you!