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
Default Set Range of Visible Cells

Hi

I need a UDF (user defined function) that extracts the visible cells
from a user defined range and gives a range of visible cells.

I found this UDF on the internet. But it gives me some errors when I
apply an AutoFilter to my table.

Where's the mistake?
Thanks in advance.

================================================
Function Vis(VisibleRange As Range) As Range

Dim Cell As Range
Application.Volatile

Set Vis = Nothing

For Each Cell In VisibleRange

If Not (Cell.EntireRow.Hidden Or Cell.EntireColumn.Hidden) Then

If Vis Is Nothing Then
Set Vis = Cell
Else
Set Vis = Union(Vis, Cell)
End If

End If

Next Cell



End Function

 
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
How do I include only visible cells in a range? Frequent User Excel Worksheet Functions 1 November 28th 05 04:31 PM
Copy only Visible Cells of a Variable Range... Damian Carrillo[_2_] Excel Programming 2 July 21st 05 01:12 AM
Sum only visible cells within a range. Jason Kendall Excel Programming 4 July 14th 05 05:18 PM
Select only visible cells in a selected range DataFreakFromUtah Excel Programming 1 May 13th 04 03:26 AM
Trying to select the visible range of cells Selector Excel Programming 1 February 1st 04 08:40 PM


All times are GMT +1. The time now is 10:26 PM.

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"