#### ststern45

##### Well-known Member

- Joined
- Sep 17, 2005

- Messages
- 958

- Office Version
- 365
- 2010

- Platform
- Windows

I have the following code and want to change the location of the calculations.

I'm not sure how the cell row column etc. works but here goes:

I current have the calculations in 1 worksheet in cell column A1:A1000 and the calculations that remove the blank cells is in column B1:B1000.

I want to change it in cell range AF1:AF1000 and the calculations in cell range AK1:AK1000

Would I need to change the Cells(i, 1) another value to match cell column AF?

Thanks in advance!!

I'm not sure how the cell row column etc. works but here goes:

I current have the calculations in 1 worksheet in cell column A1:A1000 and the calculations that remove the blank cells is in column B1:B1000.

I want to change it in cell range AF1:AF1000 and the calculations in cell range AK1:AK1000

Would I need to change the Cells(i, 1) another value to match cell column AF?

Thanks in advance!!

Code:

```
Sub DeleteBlankRows()
Dim counter As Integer, i As Integer
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
counter = 0
For i = 1 To 1000
If Cells(i, 1).Value <> "" Then
Cells(counter + 1, 2).Value = Cells(i, 1).Value
counter = counter + 1
End If
Next i
Range("F1").Select
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub
```

Last edited by a moderator: