Ok so i'm trying to reconcile a mapping file given by my corporate overlords to our chart of accounts. Unfortunately, the full string they give us is broken up by periods (like so 515.73120.62200.1825.31). we have to take the periods out to get it to fit in the user defined field we use. seems pretty straight forward right? i pulled a list of all our accounts and the mapping we have into excel, and i'm trying to compare via VLookup to the mapping from corporate. i get the delimited string from the corporate sheet, copy that and paste special/values into a Text column, and then find and replace all "." characters with blank. Excel seems to like to round what it thinks is a number now, and display in scientific notation.
so from 515.73120.62200.1825.31
I get 5157312062200180000
when i want 5157312062200182531
I tried popping an A in front, and that keeps the exact number when i remove the "." characters, but when i find/replace the "A", i get the same result. However, if i go into the cell itself, and manually delete the A, it's fine, and i get the green "want to change this into a number" flag on the cell. but that's not feasible b/c i have 3,000+ rows.
Anyone have any ideas?
Posts
I made @deebaser a program that does a similar fix. Not sure if it ever worked for him. I could probably whip something up for you as well.
Each cell has a format setting -- you can find it by selecting and right clicking. You can probably select everything and pick the autoformat that doesn't format?
Yeah i set all the cells in the column i copy/paste into to Text.
I'm going to kick Bill Gates in the dick.
=SUBSTITUTE( A1, ".", "" )
?
So column A has the full "515.73120.62200.1825.31" text, and the column with the formula displays (at least for me) "5157312062200182531"
?
(Notepad FTW)
Then do a FIND/REPLACE "." with ""
(Important Final step) Then copy the result and paste it into Notepad first..then copy and paste it FROM Notepad, into the same column in Excel.
Should work fine from there.
This really sounds like a job for Perl moreso than Excel, though. Parse everything into a couple of hashes, do your lookups, and then print out the results in whatever format you like.
Skip word and do the entire thing in notepad (CTRL+H for replace). In Excel, BEFORE you past anything in, select the entire column and format it as text. Then when you paste it in it should do it as text rather than a number. Should being the operative word.
Alternatively, before fixing the formatting in Excel set it to text then do the find-replace there on that column, which I think will work in theory but Excel is so wonky at times who knows.
I did format the column to text, but for some reason it would still flip to scientific notation and round when i did the find/replace. i'll try the notepad suggestion next time i have to do this. thanks everybody!
Another thing you can do is format it as a number and set the decimal places to 0. Usually works for me. Why I couldn't say.