dispelthemyth
Well-known Member
- Joined
- Mar 16, 2006
- Messages
- 664
- Office Version
- 365
- Platform
- Windows
Hi
I generally analyse data for stuff that relates to my area and delete anything that does not belong to me
The code i use is below
(I use Excel 2007)
<Code>
Sub StartAnalysis()
3
If ActiveCell.Value = "DIVISION" Then GoTo 1
If ActiveCell.Value = "FJSNSD" Then GoTo 2
If ActiveCell.Value = "FJSION" Then GoTo 2
ActiveCell.EntireRow.Delete
ActiveCell.Offset(-1, 0).Select
GoTo 3
2
ActiveCell.Offset(-1, 0).Select
GoTo 3
1
End Sub
<End Code>
I generally speed this up by using the below to disable calculations and screen updating
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
But in some books i have used, it says the GoTo option is a bad/slow method for cycling through rows like this. I was wondering what the alternatives were
Thanks for any and all help
Graeme
I generally analyse data for stuff that relates to my area and delete anything that does not belong to me
The code i use is below
(I use Excel 2007)
<Code>
Sub StartAnalysis()
3
If ActiveCell.Value = "DIVISION" Then GoTo 1
If ActiveCell.Value = "FJSNSD" Then GoTo 2
If ActiveCell.Value = "FJSION" Then GoTo 2
ActiveCell.EntireRow.Delete
ActiveCell.Offset(-1, 0).Select
GoTo 3
2
ActiveCell.Offset(-1, 0).Select
GoTo 3
1
End Sub
<End Code>
I generally speed this up by using the below to disable calculations and screen updating
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
But in some books i have used, it says the GoTo option is a bad/slow method for cycling through rows like this. I was wondering what the alternatives were
Thanks for any and all help
Graeme
Last edited: