Creating a truncated range- Speed issue

A

avi

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
 
D

Dave Peterson

Maybe you could apply data|filter|autofilter and filter to show only the values
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top