ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   large numbers as text replaced with scientific notation (https://www.excelbanter.com/excel-discussion-misc-queries/216225-large-numbers-text-replaced-scientific-notation.html)

[email protected]

large numbers as text replaced with scientific notation
 
I did a search-and-replace to remove spaces from a column of 16-digit
credit card numbers stored in cells formatted as text, but afterwards,
the numbers appeared as scientific notation. If I then select each
cell in turn and click in the formula bar, the scientific notation
goes away, but the last digit of each string is replaced with zero.
How can I use search-and-replace to remove spaces without altering the
strings of digits or truning them into scientific notation?

RagDyeR

large numbers as text replaced with scientific notation
 
You could use a text formula.

With column of numbers starting in A1, insert a "helper" column, and enter
this:

=SUBSTITUTE(A1," ","")

Copy down as needed.

Then, to remove the formulas, and leave just the data behind,
select the helper column, and Right click in the selection and choose
"Copy",

Right click again and choose :"Paste Special",
Click on "Values",
Then <OK, then <Esc,
and you now have a column of data.

You could delete the original column if desired.
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

wrote in message
...
I did a search-and-replace to remove spaces from a column of 16-digit
credit card numbers stored in cells formatted as text, but afterwards,
the numbers appeared as scientific notation. If I then select each
cell in turn and click in the formula bar, the scientific notation
goes away, but the last digit of each string is replaced with zero.
How can I use search-and-replace to remove spaces without altering the
strings of digits or truning them into scientific notation?




JBeaucaire[_85_]

large numbers as text replaced with scientific notation
 
Use Substitute in an adjacent cell first to trim out the spaces.

=SUBSTITUTE(F2," ","")

Now copy that down, highlight then entire range of cells, COPY, and EDIT
PASTE SPECIAL Values over the original credit card numbers. Then delete the
helper cells.

--
"Actually, I AM a rocket scientist." -- JB


" wrote:

I did a search-and-replace to remove spaces from a column of 16-digit
credit card numbers stored in cells formatted as text, but afterwards,
the numbers appeared as scientific notation. If I then select each
cell in turn and click in the formula bar, the scientific notation
goes away, but the last digit of each string is replaced with zero.
How can I use search-and-replace to remove spaces without altering the
strings of digits or truning them into scientific notation?



All times are GMT +1. The time now is 07:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com