ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ws.Range("C51:S67").NumberFormat ? (https://www.excelbanter.com/excel-programming/430724-ws-range-c51-s67-numberformat.html)

Fan924

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?

Bob Phillips[_3_]

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?




joel

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?






All times are GMT +1. The time now is 04:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com