SOLVED
Home

Need Excel to Stop Reformatting Numbers

%3CLINGO-SUB%20id%3D%22lingo-sub-771386%22%20slang%3D%22en-US%22%3ENeed%20Excel%20to%20Stop%20Reformatting%20Numbers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-771386%22%20slang%3D%22en-US%22%3E%3CP%3EI%20can't%20get%20Excel%20to%20leave%20my%20numbers%20alone.%20I've%20set%20my%20column%20to%20%22Text%22%20in%20the%20format%20settings%2C%20but%20nothing%20I%20do%20in%20the%20number%20or%20other%20format%20settings%20is%20having%20any%20effect.%20It's%20been%20going%20on%20for%20a%20couple%20of%20days%20now%2C%20and%20I'm%20losing%20valuable%20time%20trying%20to%20get%20it%20to%20stop.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20importing%201700%2B%20identifier%20numbers%2C%20with%20intermittent%20hyphens%2C%20for%20a%20range%20of%20books%20going%20into%20a%20database.%20I%20need%20to%20manage%20these%20numbers%20in%20a%20way%20that%20requires%20they%20stay%20exactly%20as%20they%20are%3A%20no%20leading%20zeros%20removed%2C%20none%20converted%20to%20dates%2C%20etc.%20They%20need%20to%20stay%20exactly%20as%20imported.%20This%20is%20a%20sample%20of%20what%20they%20look%20like%20before%20import%3A%3CBR%20%2F%3E00-4%3CBR%20%2F%3E000-9%3CBR%20%2F%3E01-1%3CBR%20%2F%3E001-7%3CBR%20%2F%3E002-5%3CBR%20%2F%3E003-3%3CBR%20%2F%3E3-536-3%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEven%20when%20I%20format%20the%20column%20to%20Text%2C%20which%20is%20supposed%20to%20leave%20all%20numbers%20alone%2C%20the%20%2201-1%22%20in%20this%20list%20will%20paste%20as%20the%20date%20%221-Jan%22%2C%20as%20will%20all%20others%20throughout%20this%201700%2B%20that%20resemble%20a%20date%20structure.%20I%20really%20need%20to%20get%20this%20work%20done%20and%20can't%20if%20Excel%20won't%20allow%20me%20to%20use%20my%20numbers%20as%20basic%20numbers.%20I've%20wiped%20my%20preferences%20and%20reinstalled%20Excel%2C%20but%20it%20still%20does%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20using%20Excel%20for%20Mac%2C%20Office%20365%20Subscription%2C%20Version%2016.27.%20Hoping%20there's%20a%20solution%20for%20this.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-771386%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExcel%20on%20Mac%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-771627%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20Excel%20to%20Stop%20Reformatting%20Numbers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-771627%22%20slang%3D%22en-US%22%3EPrecisely%20how%20are%20you%20importing%20the%20data%3F%20Have%20a%20look%20at%20this%20page%3A%20%3CA%20href%3D%22https%3A%2F%2Fjkp-ads.com%2Farticles%2Fimporttext.asp%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fjkp-ads.com%2Farticles%2Fimporttext.asp%3C%2FA%3EI%20know%20it%20is%20for%20WIndows%20Excel%2C%20but%20this%20uses%20very%20old%20technology%20which%20has%20been%20around%20for%20decades%20so%20I%20expect%20Mac%20Excel%20has%20this%20feature%20too.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-771652%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20Excel%20to%20Stop%20Reformatting%20Numbers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-771652%22%20slang%3D%22en-US%22%3E%3CP%3Eis%20that%20little%20bugger%2001-1%20changing%20to%201-Jan%2C%20you%20gotta%20identify%20each%20cell%20that%20converts%20to%20date%201st.%20Use%20the%20column%20next%20to%20date%20to%20help%20with%20transformation%20then%2C%26nbsp%3Bwhat%20I%20did%20was%20select%20all%2C%20format%20cells.%20The%20little%20bugger%20converted%20to%20a%20date%20type%20text%20string%20%2243466%22%20Then%20continue%20to%20transform%20data%20by%20using%20the%20filter%20function%20to%20filter%20just%20the%20buggers%20that%20want%20to%20force%20into%20a%20date%20format%2C%20then%20manually%20type%20in%2001-1%20in%20those%20cells%20to%20get%20back%20to%20%22clean%22%20data%20for%20your%20purpose.%20Hope%20this%20helps%20you%26nbsp%3B%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F381377%22%20target%3D%22_blank%22%3E%40Casey-Cayce%3C%2FA%3E%26nbsp%3B%20not%20really%20a%20good%20solution%20but%20a%20transformation%20solution%20work%20around.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-773216%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20Excel%20to%20Stop%20Reformatting%20Numbers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-773216%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F22322%22%20target%3D%22_blank%22%3E%40Jan%20Karel%20Pieterse%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPerfect...%20thank%20you.%26nbsp%3B%20I've%20been%20using%20Excel%20for%20a%20couple%20of%20decades%20now%20and%20have%20never%20had%20it%20be%20so%20persistently%20obstinate%20with%20imported%20data.%26nbsp%3B%20I've%20always%20set%20my%20import%20up%20in%20a%20text%20doc%20as%20plain%20text%E2%80%94not%20RTF%E2%80%94%2C%20simply%20copied%20and%20pasted%2C%20and%20have%20been%20able%20to%20make%20that%20work%2C%20with%20the%20occasional%20nuisance%20to%20correct.%26nbsp%3B%20After%20all%20these%20years%2C%20I've%20never%20used%20the%20data%20import%20function%20you%20pointed%20out%2C%20allowing%20me%20to%20specify%20import%20parameters.%26nbsp%3B%20I%20guess%20it's%20a%20lesson%20in%20%22never%20too%20late%20to%20learn%22.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20again%2C%20Jan.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-773219%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20Excel%20to%20Stop%20Reformatting%20Numbers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-773219%22%20slang%3D%22en-US%22%3EGlad%20I%20could%20teach%20you%20something%20new!%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Aslightly_smiling_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-773221%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20Excel%20to%20Stop%20Reformatting%20Numbers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-773221%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F267000%22%20target%3D%22_blank%22%3E%40Jakmart%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%20Jakmart...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20tried%20your%20workaround%20and%20it%20did%20work.%26nbsp%3B%20Problem%20is%2C%20this%20worksheet%20has%20nearly%201800%20rows%20of%20data%E2%80%94which%20will%20grow%20to%20well%20over%202%2C000%E2%80%94and%20up%20to%2075%20columns%2C%20all%20of%20which%20stand%20to%20have%20the%20same%20anomalies.%26nbsp%3B%20So%2C%20even%20with%20such%20an%20effective%20and%20handy%20workaround%2C%20the%20bulk%20of%20my%20time%20would%20go%20to%20applying%20it%20to%20what%20might%20be%20hundreds%20of%20instances.%26nbsp%3B%20Check%20out%20Jan's%20solution%2C%20if%20I%20could%20share%20that%2C%20though%20I%20feel%20a%20bit%20dumb%20for%20not%20knowing%20of%20it%20sooner%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20keeping%20yours%20in%20my%20Excel%20cookbook%2C%20though%2C%20for%20those%20isolated%20instances%20where%20it%20will%20definitely%20come%20in%20handy.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20again%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-773223%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20Excel%20to%20Stop%20Reformatting%20Numbers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-773223%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F22322%22%20target%3D%22_blank%22%3E%40Jan%20Karel%20Pieterse%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20did%2C%20and%20thank%20you!%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Casey-Cayce
New Contributor

I can't get Excel to leave my numbers alone. I've set my column to "Text" in the format settings, but nothing I do in the number or other format settings is having any effect. It's been going on for a couple of days now, and I'm losing valuable time trying to get it to stop.

 

I'm importing 1700+ identifier numbers, with intermittent hyphens, for a range of books going into a database. I need to manage these numbers in a way that requires they stay exactly as they are: no leading zeros removed, none converted to dates, etc. They need to stay exactly as imported. This is a sample of what they look like before import:
00-4
000-9
01-1
001-7
002-5
003-3
3-536-3

 

Even when I format the column to Text, which is supposed to leave all numbers alone, the "01-1" in this list will paste as the date "1-Jan", as will all others throughout this 1700+ that resemble a date structure. I really need to get this work done and can't if Excel won't allow me to use my numbers as basic numbers. I've wiped my preferences and reinstalled Excel, but it still does it.

 

I'm using Excel for Mac, Office 365 Subscription, Version 16.27. Hoping there's a solution for this.

8 Replies
Solution
Precisely how are you importing the data? Have a look at this page: https://jkp-ads.com/articles/importtext.asp I know it is for WIndows Excel, but this uses very old technology which has been around for decades so I expect Mac Excel has this feature too.

is that little bugger 01-1 changing to 1-Jan, you gotta identify each cell that converts to date 1st. Use the column next to date to help with transformation then, what I did was select all, format cells. The little bugger converted to a date type text string "43466" Then continue to transform data by using the filter function to filter just the buggers that want to force into a date format, then manually type in 01-1 in those cells to get back to "clean" data for your purpose. Hope this helps you  @Casey-Cayce  not really a good solution but a transformation solution work around.

@Jan Karel Pieterse 

 

Perfect... thank you.  I've been using Excel for a couple of decades now and have never had it be so persistently obstinate with imported data.  I've always set my import up in a text doc as plain text—not RTF—, simply copied and pasted, and have been able to make that work, with the occasional nuisance to correct.  After all these years, I've never used the data import function you pointed out, allowing me to specify import parameters.  I guess it's a lesson in "never too late to learn".

 

Thanks again, Jan.

Glad I could teach you something new! :-)

@Jakmart 

 

Thanks, Jakmart...

 

I tried your workaround and it did work.  Problem is, this worksheet has nearly 1800 rows of data—which will grow to well over 2,000—and up to 75 columns, all of which stand to have the same anomalies.  So, even with such an effective and handy workaround, the bulk of my time would go to applying it to what might be hundreds of instances.  Check out Jan's solution, if I could share that, though I feel a bit dumb for not knowing of it sooner

 

I'm keeping yours in my Excel cookbook, though, for those isolated instances where it will definitely come in handy.

 

Thanks again

@Jan Karel Pieterse 

 

You did, and thank you!

@Casey-Cayce Yes, that was a "kluge" solution, as I continue to learn, I look at your use case similar to a process followed by many people in my organization. So being an advanced user, since we decided to abandon Quatrro Pro (early 90's), I will share the import method which shows up as Power Query in today's O365 environment. Those old dialog screen shots are OBE (Obsolete by Events) when you have upgraded to Excel - O365. So best scenario is to copy paste into a text file (NorePad) or CSV (Excel Save As) and then use the import file function under the Data menu - Get and Transform ribbon section, from Tect/CSV file and then you are in the Power Query dialog window not the older (still good method) of import from Excel prior to O365. I'll share this out in my org and produce a video to solve the problem that repeats over and over base on the user doing the work, that is how I define an Agile Transformation! You now will see a query definition under the Data menu - ribbon area "Query and Connections".

Yes, PQ is great, but in case of importing text files the old method is more transparent with regards to choosing things like the decimal separator and the date order.
Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
16 Replies
flashing a white screen while open new tab
cntvertex in Discussions on
11 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
Early preview of Microsoft Edge group policies
Sean Lyndersay in Discussions on
65 Replies