Excel VBA Sub Routine is extremely Slow deleting a Range The following script is very slow and I'm not sure why.
The script works so if you copy and paste its a typo in the question.  

Sub deleteData()
Dim wb as workbook
Dim ws as worksheet
Dim myCell as range
dim myRange as Range

with Application
 .Calculation = xlCalculationManual
 .ScreenUpdating = False
end with

Set wb = activeworkbook
set ws = wb.Sheets(1)
set myRange = ws.range("I15845:I64572")
set myCell = ws.range("I15845")

For each myCell in myRange 
  myCell.Delete
next myCell

with Application
 .Calculation = xlCalculationAutomatic
 .ScreenUpdating = True
end with

MsgBox "Procedure Complete!"

end sub


I have also tried

Sub deleteData()
Dim wb as workbook
Dim ws as worksheet
Dim myCell as range
dim myRange as Range

with Application
 .Calculation = xlCalculationManual
 .ScreenUpdating = False
end with

Set wb = activeworkbook
set ws = wb.Sheets(1)
set myRange = ws.range("I15845:I64572")

myRange.Delete

with Application
 .Calculation = xlCalculationAutomatic
 .ScreenUpdating = True
end with

MsgBox "Procedure Complete!"

end sub


I know this is a large range but it should not take hours to complete.

The data in the column is an anchored countif.

=countif($A$1:A1,A1)


So each cell would be:

=countif($A$1:A1,A1)
=countif($A$1:A2,A2)
=countif($A$1:A3,A3)
.
.
.
=countif($A$1:A10000,A10000)
COUNTIF() is slow.  A few COUNTIF() statements in a worksheet can be okay, but thousands of them will result in a glacial spreadsheet.

Here is a way to replace your COUNTIF() statements:


Sort Column A.
In Column B, have each cell check if the corresponding cell in column A is equal to the cell above it in column A.  If no, put 1 in column B's cell.  If yes, set column B's cell equal to 1 + the value in the cell above it in column B.
In Column C, have each cell check if the corresponding cell in column A is equal to the cell below it in column A.  If yes, let the cell in column C be an empty string.  If no, set column C's cell equal to column B's cell.
(Optional)  In Column D, have each cell check if the corresponding cell in column C is an empty string.  If no, set column D's cell equal to column C's cell.  If yes, set column D's cell equal to the cell below it in column D.