LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default another autofilter question

i use these to give me a range of filtered data:

fRow = .CurrentRegion.Offset(1, 0).SpecialCells(xlCellTypeVisible).Row
lRow = .Cells(Rows.Count, "A").End(xlUp).Row
(these seem to always work and give me range of rows)

but when i use the following line to set a range, it doesn't work if there is
only 1 filtered row. it works if there is more than 1 row.
Set rng = ws.Range(ws.Cells(fRow, "I"), ws.Cells(lRow,
"I")).SpecialCells(xlCellTypeVisible)
i get something like this for the range:
$1:$5,$3762:$3762,$8375:$65536
you can see that 3762 is the one filtered row i want in this case.

how can i set the range if there is only 1 row of filtered data?



--


Gary



 
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
autofilter question Gary Keramidas Excel Programming 3 December 1st 06 12:37 AM
AutoFilter Question Ram Excel Discussion (Misc queries) 6 November 27th 06 04:05 PM
AutoFilter Question AccessHelp Excel Discussion (Misc queries) 2 September 29th 06 09:25 PM
Autofilter Question Acute Mind[_2_] Excel Programming 2 April 1st 05 02:14 PM
AutoFilter Question Michael Kintner[_3_] Excel Programming 2 January 6th 04 04:06 AM


All times are GMT +1. The time now is 01:58 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"