Copying Numeric Text

R

Rodman

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
 
G

Gary''s Student

You must do TWO thing:

1. pre-format the destination cell as Text
2. when pasting use PasteSpecial Text
 
F

FSt1

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
 
S

Shane Devenshire

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
 
R

Rodman

Thanks - That Worked!
--
Rodman Veney


Shane Devenshire said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top