Copy row formatting down

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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!
 
Dim lastrow as Long
lastrow = Cells(rows.count,"A").end(xlup).row
Range("A11:AG11").copy
Range(cells(12,"A"),cells(lastrow,"AG")).PasteSpecial _
xlFormats
 
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
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top