Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy row formatting down
Hi All.....
If someone would be so kind......I need help. I'm trying to copy the formatting, (including Conditional formatting), from Range A11:AG11, down the sheet, as far as there is data in column A.....the recorder is not too good at this, and I'm even worse. TIA Vaya con Dios, Chuck, CABGx3 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy row formatting down
When you don't know the end point of a range, then select a point you do
know (i.e. "A1") then use End(xlDown) & any offsets as necessary. Foe example... Range("A1").Select: Range(ActiveCell, ActiveCell.End(xlDown).Offset(x, y)).Select Substitute x & y with values if necessary, or just remove the Offset. Rob Edwards Always look on the bright side of life! *** Sent via Developersdex http://www.developersdex.com *** |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy row formatting down
Dim lastrow as Long
lastrow = Cells(rows.count,"A").end(xlup).row Range("A11:AG11").copy Range(cells(12,"A"),cells(lastrow,"AG")).PasteSpec ial _ xlFormats -- Regards, Tom Ogilvy "CLR" wrote: Hi All..... If someone would be so kind......I need help. I'm trying to copy the formatting, (including Conditional formatting), from Range A11:AG11, down the sheet, as far as there is data in column A.....the recorder is not too good at this, and I'm even worse. TIA Vaya con Dios, Chuck, CABGx3 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy row formatting down
Untested:
Dim LastRow as long with worksheets("sheet9999") lastrow = .cells(.rows.count,"A").end(xlup).row .range("a11:AG11").copy .range("a11:A" & lastrow).pastespecial paste:=xlpasteformats end with CLR wrote: Hi All..... If someone would be so kind......I need help. I'm trying to copy the formatting, (including Conditional formatting), from Range A11:AG11, down the sheet, as far as there is data in column A.....the recorder is not too good at this, and I'm even worse. TIA Vaya con Dios, Chuck, CABGx3 -- Dave Peterson |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy row formatting down
Thanks much Tom.........that did exactly as I needed.
Vaya con Dios, Chuck, CABGx3 "Tom Ogilvy" wrote: Dim lastrow as Long lastrow = Cells(rows.count,"A").end(xlup).row Range("A11:AG11").copy Range(cells(12,"A"),cells(lastrow,"AG")).PasteSpec ial _ xlFormats -- Regards, Tom Ogilvy "CLR" wrote: Hi All..... If someone would be so kind......I need help. I'm trying to copy the formatting, (including Conditional formatting), from Range A11:AG11, down the sheet, as far as there is data in column A.....the recorder is not too good at this, and I'm even worse. TIA Vaya con Dios, Chuck, CABGx3 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy row formatting down
Thanks for the response Rob.....it looks understandable, and when I get more
time, I'll study it...........for now, Tom hit the nail on the head. Thanks Vaya con Dios, Chuck, CABGx3 "Rob Edwards" wrote: When you don't know the end point of a range, then select a point you do know (i.e. "A1") then use End(xlDown) & any offsets as necessary. Foe example... Range("A1").Select: Range(ActiveCell, ActiveCell.End(xlDown).Offset(x, y)).Select Substitute x & y with values if necessary, or just remove the Offset. Rob Edwards Always look on the bright side of life! *** Sent via Developersdex http://www.developersdex.com *** |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy row formatting down
Thanks Dave......Tom already got me there. Yours looks good too, but in this
case I'm using this in a sub that is called to many different sheets, so I'd like to keep the sheet reference out of it. Thanks anyway, Vaya con Dios, Chuck, CABGx3 "Dave Peterson" wrote: Untested: Dim LastRow as long with worksheets("sheet9999") lastrow = .cells(.rows.count,"A").end(xlup).row .range("a11:AG11").copy .range("a11:A" & lastrow).pastespecial paste:=xlpasteformats end with CLR wrote: Hi All..... If someone would be so kind......I need help. I'm trying to copy the formatting, (including Conditional formatting), from Range A11:AG11, down the sheet, as far as there is data in column A.....the recorder is not too good at this, and I'm even worse. TIA Vaya con Dios, Chuck, CABGx3 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy formatting, Help | Excel Discussion (Misc queries) | |||
Copy Formatting from one row to another using VBA | Excel Programming | |||
Copy Conditional Formatting | Excel Discussion (Misc queries) | |||
copy conditional formatting | New Users to Excel | |||
copy formatting | Excel Programming |