Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Selecting Range After AutoFilter

I have code that runs an AutoFilter, on a six column
dataset in column A thru F. I use the following code
to try select a part of the result.

With .AutoFilter.Range
.Offset(0, 1).Resize(.Rows.Count - 0). _
SpecialCells(xlVisible).Select
End With

This will start the select in Column B but then runs it
out thru column G (a blank)

Question: Is there a way to just select column B,C, & D?
Thanks. -Randy-

..


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Selecting Range After AutoFilter

Try:
With .AutoFilter.Range
.Offset(0, 1).Resize(.Rows.Count ,3).SpecialCells(xlVisible).Select
End With

or

Range("B:D").Select

This will select only the visible cells when in the filter mode.



"Randal W. Hozeski" wrote in message
news:cItHb.498285$275.1405392@attbi_s53...
I have code that runs an AutoFilter, on a six column
dataset in column A thru F. I use the following code
to try select a part of the result.

With .AutoFilter.Range
.Offset(0, 1).Resize(.Rows.Count - 0). _
SpecialCells(xlVisible).Select
End With

This will start the select in Column B but then runs it
out thru column G (a blank)

Question: Is there a way to just select column B,C, & D?
Thanks. -Randy-

.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Selecting Range After AutoFilter

The first one work fine!! Thanks. -Randy-



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 690
Default Selecting Range After AutoFilter

Perhaps just another way...

Sub Demo()
With ActiveSheet.AutoFilter
Intersect(.Range, .Range.Offset(1, 0),
[B:D]).SpecialCells(xlVisible).Select
End With
End Sub

--
Dana DeLouis
Using Windows XP & Office XP
= = = = = = = = = = = = = = = = =


"Randal W. Hozeski" wrote in message
news:cItHb.498285$275.1405392@attbi_s53...
I have code that runs an AutoFilter, on a six column
dataset in column A thru F. I use the following code
to try select a part of the result.

With .AutoFilter.Range
.Offset(0, 1).Resize(.Rows.Count - 0). _
SpecialCells(xlVisible).Select
End With

This will start the select in Column B but then runs it
out thru column G (a blank)

Question: Is there a way to just select column B,C, & D?
Thanks. -Randy-

.




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Selecting Range After AutoFilter

Thanks I will try it.

How about taking it one step further?

Naming that range? I want to use the
name "test" that was defined earlier,
but after deleting it and redefining it,
the recorder put those referrs to: actual
locations in there. or even better define
ranges within. First 13 entires(rows) = test1
next 13 test2, etc with the last one being
a partial list.

-Randy-





*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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
HELP: Selecting Non-Visible (Hidden) Cells with AutoFilter Applied west8100 Excel Discussion (Misc queries) 3 February 11th 09 11:26 PM
HELP: Selecting Non-Visible (Hidden) Cells when AutoFilter is Appl west8100 Excel Worksheet Functions 2 February 11th 09 09:20 PM
HELP: Selecting Non-Visible (Hidden) Cells with AutoFilter Applied west8100 Excel Discussion (Misc queries) 0 February 10th 09 09:28 PM
HELP: Selecting Non-Visible (Hidden) Cells with AutoFilter Applied west8100 Excel Discussion (Misc queries) 0 February 10th 09 09:28 PM
HELP: Selecting Non-Visible (Hidden) Cells with AutoFilter Applied west8100 Excel Discussion (Misc queries) 0 February 10th 09 09:27 PM


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

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"