Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / October 2008

Tip: Looking for answers? Try searching our database.

Selection.EntireRow - Filtered

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bam - 10 Oct 2008 00:22 GMT
Hi,

I am trying to copy (selected) filtered data from one sheet to another.

Previously I have used Selection.EntireRow which copies a selection of
filtered rows.

I now need to just copy from Column C to Column AO - Not the EntireRow -
With only the rows that i select.

I have been using this...

Set serng = Selection.EntireRow
           serng.Copy
           ActiveSheet.Range("A2").Select
           Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats,
Operation:= _
               xlNone, SkipBlanks:=False, Transpose:=False

But I ultimately only want it to copy from Column C and skip A & B.

How do I just copy partial rows?

Thanks,
Bam
JLGWhiz - 10 Oct 2008 02:31 GMT
Using what you already have.  Just select column C of the filtered range and
use this modified code:

Set serng = Selection
           serng.Copy
           ActiveSheet.Range("A2").Select
           Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats,
Operation:= _
               xlNone, SkipBlanks:=False, Transpose:=False

> Hi,
>
[quoted text clipped - 21 lines]
> Thanks,
> Bam
Bam - 10 Oct 2008 02:53 GMT
That only copies the data in Column C when I need the Range From C:AO.

I may be confusing the issue by even mentioning a filter.

Say i select
R3C18
R20C18
R30C18
(The column number will usually be the same in my selection).

How do i then copy
Range(R3C3:R3C41) To Sheet1!$A2
Range(R20C3:R20C41) To Sheet1!$A3
Range(R30C3:R30C41) To Sheet1!$A4
Etc..for each cell selected.

Any help would be great.

Bam.

> Using what you already have.  Just select column C of the filtered range and
> use this modified code:
[quoted text clipped - 31 lines]
> > Thanks,
> > Bam
JLGWhiz - 10 Oct 2008 03:39 GMT
Maybe you can find something at one of these sites to help.

http://www.kayodeok.btinternet.co.uk/favorites/kbofficeexcelhowto.htm

http://www.rondebruin.nl/tips.htm

> That only copies the data in Column C when I need the Range From C:AO.
>
[quoted text clipped - 51 lines]
> > > Thanks,
> > > Bam
Bam - 10 Oct 2008 04:33 GMT
Maybe it's in there but I'm unable to find where?

Anyone else with a suggestion?

Thanks,
Bam.

> Maybe you can find something at one of these sites to help.
>
[quoted text clipped - 57 lines]
> > > > Thanks,
> > > > Bam
JMB - 10 Oct 2008 06:37 GMT
Perhaps

Intersect(Selection.EntireRow, Range("C:AO")).Copy
Range("A2").PasteSpecial Paste:=xlPasteValuesAndNumberFormats, _
 operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False

> Maybe it's in there but I'm unable to find where?
>
[quoted text clipped - 64 lines]
> > > > > Thanks,
> > > > > Bam
Bam - 11 Oct 2008 00:37 GMT
Thankyou JMB - Works Perfect!

> Perhaps
>
[quoted text clipped - 71 lines]
> > > > > > Thanks,
> > > > > > Bam
JMB - 11 Oct 2008 05:24 GMT
Glad to help - thanks for the feedback

> Thankyou JMB - Works Perfect!
>
[quoted text clipped - 73 lines]
> > > > > > > Thanks,
> > > > > > > Bam
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.