View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
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?