DarrenBurke
New Member
- Joined
- May 6, 2022
- Messages
- 29
- Office Version
- 2016
- 2007
- Platform
- Windows
Hi, Guys and gals,
Can i tweak this code to run faster.
What are you trying to do ? I want the code to check colum "A" for empty cells and delete the entire row. (Basically the telesales did not capture the correct info, therefore the row of info is useless and needs to be deleted. ) It works as is but takes a long time to finish. I have 10 other sheets to apply it to with a macro on each sheet. Thank you to the Hive Minds
I hope i did the code correctly
Cheers
Can i tweak this code to run faster.
What are you trying to do ? I want the code to check colum "A" for empty cells and delete the entire row. (Basically the telesales did not capture the correct info, therefore the row of info is useless and needs to be deleted. ) It works as is but takes a long time to finish. I have 10 other sheets to apply it to with a macro on each sheet. Thank you to the Hive Minds
VBA Code:
Sub Delete_Rows_with_Blank_Cells_in_Single_Column()
Worksheets("MichaelF").Activate
Set Rng = ActiveSheet.UsedRange
Blank_Cells_Column = 1
For i = Rng.Rows.Count To 1 Step -1
If Rng.Cells(i, Blank_Cells_Column) = "" Then
Rng.Cells(i, Blank_Cells_Column).EntireRow.Delete
End If
Next i
End Sub
I hope i did the code correctly
Cheers