PC Review


Reply
Thread Tools Rate Thread

Copy row formatting down

 
 
=?Utf-8?B?Q0xS?=
Guest
Posts: n/a
 
      20th Feb 2007
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


 
Reply With Quote
 
 
 
 
Rob Edwards
Guest
Posts: n/a
 
      20th Feb 2007
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 ***
 
Reply With Quote
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      20th Feb 2007
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

--
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
>
>

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      20th Feb 2007
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 With Quote
 
=?Utf-8?B?Q0xS?=
Guest
Posts: n/a
 
      20th Feb 2007
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")).PasteSpecial _
> 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
> >
> >

 
Reply With Quote
 
=?Utf-8?B?Q0xS?=
Guest
Posts: n/a
 
      20th Feb 2007
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 ***
>

 
Reply With Quote
 
=?Utf-8?B?Q0xS?=
Guest
Posts: n/a
 
      20th Feb 2007
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy formatting, Help robert morris Microsoft Excel Misc 9 5th Mar 2008 10:20 PM
Copy Formatting from one row to another using VBA louisamarkham@gmail.com Microsoft Excel Programming 3 27th Jun 2006 12:28 PM
copy formatting =?Utf-8?B?ZGVlZGU=?= Microsoft Access 1 16th Mar 2006 01:00 AM
copy formatting Olof Carlsson Microsoft Excel Programming 2 17th Jun 2005 02:54 PM
I want to copy formatting ram1000 Microsoft Excel Misc 2 14th Jan 2004 02:07 AM


Features
 

Advertising
 

Newsgroups
 


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