citroendealer
New Member
- Joined
- Sep 27, 2016
- Messages
- 13
Hello fellow VBA'ers,
For a project I need to make a data set more readable. For this I need to delete 18 rows and then skip 1. This needs to be done as many elements I have in my data set. The code that is use is shown below. j is the number of elements and is prescribed within my code. The problem is that i have sometimes 2000 or 5000 elements. This takes minutes to run this part of the code. Is there a faster way?
For a project I need to make a data set more readable. For this I need to delete 18 rows and then skip 1. This needs to be done as many elements I have in my data set. The code that is use is shown below. j is the number of elements and is prescribed within my code. The problem is that i have sometimes 2000 or 5000 elements. This takes minutes to run this part of the code. Is there a faster way?
Code:
For i = 1 To j
For a = 1 To 18
ActiveCell.EntireRow.Delete
Next a
Selection.Offset(1, 0).Select
Next i