Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default 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   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default 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   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy formatting, Help robert morris Excel Discussion (Misc queries) 9 March 5th 08 10:20 PM
Copy Formatting from one row to another using VBA [email protected] Excel Programming 3 June 27th 06 12:28 PM
Copy Conditional Formatting G Excel Discussion (Misc queries) 6 November 11th 05 08:24 PM
copy conditional formatting ajitbmunj New Users to Excel 2 September 29th 05 04:21 PM
copy formatting Olof Carlsson Excel Programming 2 June 17th 05 02:54 PM


All times are GMT +1. The time now is 08:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"