Find all non-blank cells

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the following code to cycle through a worksheet and find all non-blank
cells

For Each c In ActiveSheet.UsedRange
If c.Value <> "" Then
CheckValue
End If
Next

This works, but takes a few minutes - even though there are only roughly 200
non-blank cells.

Any suggestions on how to speed this up? (I also tried "for each c in cells")

Thanks!

Andrew
 
You can try specialcells

Record a macro when you do this

Select the range
F5
Special
Constants
OK
 
application.screenupdating = false
' your code
application.screenupdating = true

Regards

Trevor
 

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

Back
Top