Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 238
Default ws.Range("C51:S67").NumberFormat ?

ws.Range("A3:Q19").Value = ws.Range("C51:S67").Value
ws.Range("A3:Q19").NumberFormat = ws.Range
("C51:S67").NumberFormat
This works fine for copting the value. I tried to copy the
NumberFormat and it does not work Is there something else I can try?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default ws.Range("C51:S67").NumberFormat ?


Try

ws.Range("A3:Q19").Value = ws.Range("C51:S67").Value
ws.Range("A3:Q19").NumberFormat = ws.Range("C51").NumberFormat

--
__________________________________
HTH

Bob

"Fan924" wrote in message
...
ws.Range("A3:Q19").Value = ws.Range("C51:S67").Value
ws.Range("A3:Q19").NumberFormat = ws.Range
("C51:S67").NumberFormat
This works fine for copting the value. I tried to copy the
NumberFormat and it does not work Is there something else I can try?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default ws.Range("C51:S67").NumberFormat ?

when you are copying from multiple locations use Copy

ws.Range("C51:S67").Copy
ws.Range("A3:Q19").PasteValue _
Paste:=xlpastevalues
ws.Range("C51").Copy
ws.Range("A3:Q19").PasteValue _
Paste:=xlpasteformats

I don't know if the formats for the trange "C51:S67" are the same. This may
also work

ws.Range("C51:S67").Copy
ws.Range("A3:Q19").PasteValue _
Paste:=xlpastevalues
ws.Range("A3:Q19").PasteValue _
Paste:=xlpasteformats




"Bob Phillips" wrote:

Try

ws.Range("A3:Q19").Value = ws.Range("C51:S67").Value
ws.Range("A3:Q19").NumberFormat = ws.Range("C51").NumberFormat

--
__________________________________
HTH

Bob

"Fan924" wrote in message
...
ws.Range("A3:Q19").Value = ws.Range("C51:S67").Value
ws.Range("A3:Q19").NumberFormat = ws.Range
("C51:S67").NumberFormat
This works fine for copting the value. I tried to copy the
NumberFormat and it does not work Is there something else I can try?




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
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
use variable in Workbooks("book1").Worksheets("sheet1").Range("a1" Luc[_3_] Excel Programming 2 September 28th 05 08:37 PM
Better help in VBA for "NumberFormat Property" Bengt Nilsson, Staffanstorp, Sweden Excel Programming 2 October 10th 04 06:20 AM
Using "Cells" to write "Range("A:A,H:H").Select" Trip Ives[_2_] Excel Programming 3 June 5th 04 03:13 PM


All times are GMT +1. The time now is 02:08 PM.

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

About Us

"It's about Microsoft Excel"