Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
avi avi is offline
external usenet poster
 
Posts: 195
Default Creating a truncated range- Speed issue

Hello,

I try to create a truncated range: the new range shoulsd contain only
values greater than FilterMinValue

The following code does the job but is quite slow. Is there some
fastest way to get the new range?

For Each cell In RangeAddress
If cell.Value = FilterMinValue Then
If rng Is Nothing Then
'initialize rng with first found cell
Set rng = cell
Else
'expand the found range variable
Set rng = xlApp.Union(rng, cell)
End If
End If
Next cell

Thanks a lot
Avi
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Creating a truncated range- Speed issue

Maybe you could apply data|filter|autofilter and filter to show only the values
= filterminvalue. Then you could use specialcells(xlcelltypevisible) to get the range???


avi wrote:

Hello,

I try to create a truncated range: the new range shoulsd contain only
values greater than FilterMinValue

The following code does the job but is quite slow. Is there some
fastest way to get the new range?

For Each cell In RangeAddress
If cell.Value = FilterMinValue Then
If rng Is Nothing Then
'initialize rng with first found cell
Set rng = cell
Else
'expand the found range variable
Set rng = xlApp.Union(rng, cell)
End If
End If
Next cell

Thanks a lot
Avi


--

Dave Peterson
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
Speed Issue Stephgill Excel Discussion (Misc queries) 0 October 9th 08 12:01 PM
Speed Issue after updating cells Simon Day Excel Discussion (Misc queries) 0 October 8th 08 03:10 PM
Searching through text - Speed issue J@Y Excel Programming 1 July 3rd 07 08:32 PM
Speed issue with Multilple Web Queries [email protected] Excel Programming 1 March 1st 07 02:43 AM
Calculation speed issue Steve M Excel Discussion (Misc queries) 4 January 14th 06 02:18 AM


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