VB, Need to Delete rows
Solved/Closed
Related:
- VB, Need to Delete rows
- How to delete whatsapp account without login - Guide
- How to delete whatsapp account without phone - Guide
- How to delete a row in a table in word - Guide
- How to delete snapchat account - Guide
- How to delete icloud tabs - Guide
4 responses
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Jul 23, 2011 at 01:17 AM
Jul 23, 2011 at 01:17 AM
change
Or (Cell.Value) = "Inf" Then
If del Is Nothing Then _
tp
Or (Cell.Value) = "Inf" Then
else
If del Is Nothing Then
Or (Cell.Value) = "Inf" Then
If del Is Nothing Then _
tp
Or (Cell.Value) = "Inf" Then
else
If del Is Nothing Then
Thanks it works deleting those rows. But it deletes my header row 1 which I don't want it to. So, what would I add in code to prevent from deleting header row?
Thanks,
weenie
Thanks,
weenie
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Jul 23, 2011 at 11:06 AM
Jul 23, 2011 at 11:06 AM
Change
Set rng = Intersect(Range("Q:Q"), ActiveSheet.UsedRange)
to
Set rng = Intersect(Range("Q2:Q" & Rows.count), ActiveSheet.UsedRange)
Presumption is that row header is on row 1 and you want to check for deletion from row 2 on ward
Set rng = Intersect(Range("Q:Q"), ActiveSheet.UsedRange)
to
Set rng = Intersect(Range("Q2:Q" & Rows.count), ActiveSheet.UsedRange)
Presumption is that row header is on row 1 and you want to check for deletion from row 2 on ward
Sorry to bug but I am bad with counters. I'm thinking I have to use a counter of some sort because When I run the above code (corrected one) it hangs up. Iam bring in new files constantly and will have to scan again and agin to delete these new data not meeting requirement. My sheet can be large as 900,000 rows when looking for the values.
Thanks,
Weenie
Thanks,
Weenie
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Jul 24, 2011 at 11:48 AM
Jul 24, 2011 at 11:48 AM
I would suggest a different approach. Filter the values that you want to have. Then copy all the visible rows to a new sheet .