PC Review


Reply
Thread Tools Rate Thread

Copy/paste number as text

 
 
Otto Moehrbach
Guest
Posts: n/a
 
      23rd Jan 2007
Excel XP & Win XP
I have a bunch of 10-digit contract numbers I need to copy and paste in
a VBA routine. Say I have 1234567895. I am using "PasteSpecial
xlPasteValues" because I don't want to carry the formatting over to the
destination (colors, font size, etc).
Excel insists on pasting the numbers in scientific notation.
I tried formatting the destination cell to Text before pasting.
I tried formatting the source cell to Text before copying.
I tried both at the same time.
The pasted number is still in scientific notation.
How can I copy/paste the contract number in its original form?
Thanks for your time. Otto


 
Reply With Quote
 
 
 
 
Otto Moehrbach
Guest
Posts: n/a
 
      24th Jan 2007
Thanks Tom. I'll give that a try in the morning. Otto
"Tom Ogilvy" <(E-Mail Removed)> wrote in message
news858DEB4-B630-4409-B276-(E-Mail Removed)...
> If you really want it as text, then don't paste
>
> dim dest as Range, source as Range
> set dest =
> set source =
>
> dest.Value = "'" & source.value
>
> --
> Regards,
> Tom Ogilvy
>
>
> "Otto Moehrbach" wrote:
>
>> Excel XP & Win XP
>> I have a bunch of 10-digit contract numbers I need to copy and paste
>> in
>> a VBA routine. Say I have 1234567895. I am using "PasteSpecial
>> xlPasteValues" because I don't want to carry the formatting over to the
>> destination (colors, font size, etc).
>> Excel insists on pasting the numbers in scientific notation.
>> I tried formatting the destination cell to Text before pasting.
>> I tried formatting the source cell to Text before copying.
>> I tried both at the same time.
>> The pasted number is still in scientific notation.
>> How can I copy/paste the contract number in its original form?
>> Thanks for your time. Otto
>>
>>
>>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy & paste block of text number of times equal to value in cell azoll Microsoft Excel Worksheet Functions 1 29th Jul 2008 06:03 AM
Copy and paste every x number of cells Mike Microsoft Excel Programming 2 23rd May 2008 01:33 PM
How to copy and paste number formats only? Maestro_J Microsoft Excel Programming 7 17th Jul 2006 10:28 PM
Copy/paste a phone number smael via AccessMonster.com Microsoft Access Form Coding 1 4th Jul 2005 12:28 PM
How do I get copy/paste to copy/paste text and not the whole page =?Utf-8?B?Q2Fyb2wgSi4=?= Microsoft Word Document Management 1 6th May 2005 09:03 PM


Features
 

Advertising
 

Newsgroups
 


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