LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default Selecting Column of Visible AutoFiltered Cells.

Thankyou Tom working Ok

Regards
Bob C.

"Tom Ogilvy" wrote:

It remains a bad editing job, the correction should have been:

set rng = rng.offset(1,0).Resize(rng.rows.count-1,1)

--
Regards,
Tom Ogilvy



"Robert Christie" wrote in message
...
Hi Tom

Taking the comma out allowed the line to run , but it's copying all the
columns and I only require the names in column B to copy across to the

second
sheet at Cell B2, B38, B74 etc.

Regards Bob C.

"Tom Ogilvy" wrote:

bad editing job on my part.

set rng = rng.offset(1,0).Resize(rng.rows.count,-1)

should have no comma preceding the -1

set rng = rng.offset(1,0).Resize(rng.rows.count-1)

--
Regards,
Tom Ogilvy

"Robert Christie" wrote in message
...
Hi Tom

Tried your code and I'm getting "Run-time error '1004'
Application-defined or Object-defined error
on the line "set rng = rng.offset(1,0).Resize(rng.rows.count,-1)"


"Tom Ogilvy" wrote:

''' Tranfer Class No.4 names only
Sheets("Names").Select
[A1].Select
Selection.AutoFilter Field:=12, Criteria1:="04"
Selection.AutoFilter Field:=14, Criteria1:="Y"
set rng = Sheets("Names").Autofilter.Range
set rng = rng.offset(1,0).Resize(rng.rows.count,-1)
rng.copy
Destination:=Worksheets _
("Results2004").cells(rows.count,2).End(xlup)(2 )

''' Tranfer Class No.5 names only
Selection.AutoFilter Field:=12, Criteria1:="05"
Selection.AutoFilter Field:=14, Criteria1:="Y"
rng.Copy
Destination:=Worksheets _
("Results2004").cells(rows.count,2).End(xlup)(2 )

--
Regards,
Tom Ogilvy

"Robert Christie" wrote in

message
...
No real problem Tom, I was just trying to copy the visible cells

only.
Instead of including blank cells after the filtered names, to

ensure
all
names are copied, ( number of names per room differ). Each group

of
names
is
copied to the same second sheet at different positions down column

B.
I'm
starting at the top and working down the column so as not to
overwrite.

Tom when you say:
By default only the visible data is copied.

Do you mean Excel copies only the visible cells, even though the
resizing
has selected past say the 36, 38 or 40 names filtered.

Thanks for the reply
Regards Bob C.











 
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
HELP: Selecting Non-Visible (Hidden) Cells with AutoFilter Applied west8100 Excel Discussion (Misc queries) 0 February 10th 09 09:27 PM
Save autofiltered visible sheet to csv file? [email protected] Excel Discussion (Misc queries) 3 February 26th 07 10:38 PM
How to plot only visible autofiltered rows in a data list Craig Charts and Charting in Excel 1 June 28th 05 08:38 PM
Selecting autofiltered cells Annita Excel Programming 4 August 13th 04 06:22 PM
Error stepping through Autofiltered visible range Ed[_9_] Excel Programming 2 January 15th 04 05:34 PM


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

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

About Us

"It's about Microsoft Excel"