code efficiency in vba Excel
Posted on 2007-08-09
I have a question on vba code efficiency in Excel. For a certain range of cells, we want to not to display anything if the value of the cells is zero. So, here the clumsy code I have:
For counter = 5 To j
For counter1 = 2 To 20
If Cells(counter, counter1).Value = 0 Then
It ran reasonably well until at certain point giving out a message as "type mismatch". More importantly, it is very slow, please help to improve it.