Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Paste column as number

Hi,

I am pasting columns from one sheet to another. Some columns are
formatted as text, even though they only contain numbers. Other columns
do contain text. Is there a generic way to paste columns so that if
they are numbers, they are pasted as numbers, but if they are text
strings, they are pasted as text?

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default Paste column as number

Not in the Copy or Paste method, AFAIK
But you can correct this as follows:
Format an empty cell as general. EditCopt.
Select your data. EditPaste special, check Add.

--
Kind regards,

Niek Otten

wrote in message
oups.com...
Hi,

I am pasting columns from one sheet to another. Some columns are
formatted as text, even though they only contain numbers. Other columns
do contain text. Is there a generic way to paste columns so that if
they are numbers, they are pasted as numbers, but if they are text
strings, they are pasted as text?

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default Paste column as number

<EditCopt

should of course be

EditCopy

--
Kind regards,

Niek Otten

"Niek Otten" wrote in message
...
Not in the Copy or Paste method, AFAIK
But you can correct this as follows:
Format an empty cell as general. EditCopt.
Select your data. EditPaste special, check Add.

--
Kind regards,

Niek Otten

wrote in message
oups.com...
Hi,

I am pasting columns from one sheet to another. Some columns are
formatted as text, even though they only contain numbers. Other columns
do contain text. Is there a generic way to paste columns so that if
they are numbers, they are pasted as numbers, but if they are text
strings, they are pasted as text?

Thanks





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Paste column as number

Whoops - Forgot to mention that this is done using VB Script...

Thanks for your response anyway - I feel dumb now :/

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default Paste column as number

I guessed that :-)
Do the actions once manually with the Macro recorder engaged and copy/amend
the code to include in your script

--
Kind regards,

Niek Otten

wrote in message
oups.com...
Whoops - Forgot to mention that this is done using VB Script...

Thanks for your response anyway - I feel dumb now :/





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Paste column as number

columns(1).copy
Worksheets(2).columns(3).PasteSpecial xlValues

What does that do for you.

--
Regards,
Tom Ogilvy


wrote in message
oups.com...
Whoops - Forgot to mention that this is done using VB Script...

Thanks for your response anyway - I feel dumb now :/



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Paste column as number

Hi - tried it (xlValues), but no luck. The problem with the copy and
paste is that I am doing it from the same column.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro that will paste a number in first blank cell of a column asebes Excel Discussion (Misc queries) 1 December 28th 09 05:34 PM
Copy column, paste special formulas & number formats doesn't work Beckey Excel Discussion (Misc queries) 3 July 30th 09 07:51 PM
Formula to look up a column and paste results in another column DM Excel Worksheet Functions 4 March 28th 06 07:36 PM
Auto number w/ different letter-number combos in same column Colleen B Excel Worksheet Functions 2 February 23rd 05 02:41 PM
cut and paste a text from column (B:G)to A column nancy Excel Programming 1 January 24th 04 08:31 PM


All times are GMT +1. The time now is 12:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"