Link to home
Start Free TrialLog in
Avatar of John Sheehy
John SheehyFlag for United States of America

asked on

How do i get excel to skip certain rows and show it skipped them?

So I have section in my app that has been working great for about a year now.  And still does what it is designed to do.
It displays it is exporting row X of X (Now Exporting .... Row 1 of 19 and so on)

And it does skip certain rows based on the data in one cell.

How do I get it to display that it skipped X amount of rows.  (Skipped 2 rows)

This is what I have right now:

 For i = 2 To LastRow
   
        diag.SetValue i
        diag.SetStatus "Now Exporting row..." & i & " of " & LastRow
        If ws.Range("H" & i).value = "Closed" Then GoTo Skip

Skip:
Next i

Obviously there is more before and after but I thought this would be enough.  if not please please let me know.

Thanks
John
ASKER CERTIFIED SOLUTION
Avatar of Rgonzo1971
Rgonzo1971

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of John Sheehy

ASKER

Sorry it took so long to get back.  I am trying this out right now.
This solution did exactly what I wanted it to do.  Great help.