Hi,
Excel 2007 has a LOT of cells. The looping code (below) looks at all cells, and takes forever...
How can the loop be constrained to consider ONLY cells that have some data??
e.g.: text, formula, hyperlink, notes, comments, etc. AND ignore formatting
- Could .SpecialSells() be used?
- The backend Excel tables, only holds cells with data, could only those cells that have data be evaluated?
A test could be done inside the loop (IF the cell was null, goto the next cell) But this still takes processor time to evaluate.
Bad Code
John
Excel 2007 has a LOT of cells. The looping code (below) looks at all cells, and takes forever...
How can the loop be constrained to consider ONLY cells that have some data??
e.g.: text, formula, hyperlink, notes, comments, etc. AND ignore formatting
- Could .SpecialSells() be used?
- The backend Excel tables, only holds cells with data, could only those cells that have data be evaluated?
A test could be done inside the loop (IF the cell was null, goto the next cell) But this still takes processor time to evaluate.
Bad Code

Any thoughts would be greatly appreciated.Dim C as Range, ws as worksheet
For each c in ws.cells
' Do something
Next c
John