Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'mcopying & pasting data from a database into a monthly report template. The
number formats differ depending on whether I'm copying whole numbers, currency, decimals, etc. There are formulas on the blank template, below the monthly data, to calculate the year-on-year trend. I want to copy JUST the number formats from the 12 monthly cells in one row, down to the 12 formula cells in the next row. Here's my failed attempt at blind-coding this: sub paste_number_formats() ActiveCell.Range("A1:L1").Copy ActiveCell.Offset(1, 0).Range("A1:L1").PasteSpecial _ Paste:=xlPasteNumberFormats, Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False end sub Of course, "=xlPasteNumberFormats" was invented by me, so this macro doesn't work, but that's what I'm trying to do anyway. Is this possible? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy column, paste special formulas & number formats doesn't work | Excel Discussion (Misc queries) | |||
Conditional formats- paste special formats? | Excel Discussion (Misc queries) | |||
paste conditional formats as formats | Excel Discussion (Misc queries) | |||
Paste Number Formats | Excel Discussion (Misc queries) | |||
How to copy and paste number formats only? | Excel Programming |