ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Copying Numeric Text (https://www.excelbanter.com/excel-discussion-misc-queries/212199-copying-numeric-text.html)

Rodman

Copying Numeric Text
 
When copying a numeric text string (i.e., 1234, 5678) from Notepad into a
General formatted cell of Excel the text is reformatted as a number (i.e.,
12,345,678). Is there a formula or macro to stop this and leave the text as
a numeric string?

Thanks In Advance
--
Rodman Veney

Gary''s Student

Copying Numeric Text
 
You must do TWO thing:

1. pre-format the destination cell as Text
2. when pasting use PasteSpecial Text
--
Gary''s Student - gsnu200817


"Rodman" wrote:

When copying a numeric text string (i.e., 1234, 5678) from Notepad into a
General formatted cell of Excel the text is reformatted as a number (i.e.,
12,345,678). Is there a formula or macro to stop this and leave the text as
a numeric string?

Thanks In Advance
--
Rodman Veney


FSt1

Copying Numeric Text
 
hi
not really. best to preformat as text then paste special values perticularly
if your number strings have leading zeros.
macro....after paste......change it back to text.....
sub dofomats()
range("A1:A10").Numberformat = "@"
end sub
change range to suit.
you could run the macro prior to paste to preset a large range but the paste
would have to be pastespecial values.

Regards
FSt1

"Rodman" wrote:

When copying a numeric text string (i.e., 1234, 5678) from Notepad into a
General formatted cell of Excel the text is reformatted as a number (i.e.,
12,345,678). Is there a formula or macro to stop this and leave the text as
a numeric string?

Thanks In Advance
--
Rodman Veney


Shane Devenshire[_2_]

Copying Numeric Text
 
Hi,

Just copy the number into Excel and select a column of them
1. choose Data, Text to Columns, and click Next twice
2. In the preview pane select the column with the numbers and click Text in
the top part of the window.

If this helps, please click the Yes button

Cheers,
Shane Devenshire

"Rodman" wrote:

When copying a numeric text string (i.e., 1234, 5678) from Notepad into a
General formatted cell of Excel the text is reformatted as a number (i.e.,
12,345,678). Is there a formula or macro to stop this and leave the text as
a numeric string?

Thanks In Advance
--
Rodman Veney


Rodman

Copying Numeric Text
 
Thanks - That Worked!
--
Rodman Veney


"Shane Devenshire" wrote:

Hi,

Just copy the number into Excel and select a column of them
1. choose Data, Text to Columns, and click Next twice
2. In the preview pane select the column with the numbers and click Text in
the top part of the window.

If this helps, please click the Yes button

Cheers,
Shane Devenshire

"Rodman" wrote:

When copying a numeric text string (i.e., 1234, 5678) from Notepad into a
General formatted cell of Excel the text is reformatted as a number (i.e.,
12,345,678). Is there a formula or macro to stop this and leave the text as
a numeric string?

Thanks In Advance
--
Rodman Veney



All times are GMT +1. The time now is 05:11 AM.

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