Hey Guys,
Here is a copy of the macro I've been trying to get working, could someone help make it better and fix it for the bug what I've come across
Basically, I'm trying to move any cell in the ADM:ADV range what has a number in it across to columns at the left (M to V) for example)
Thanks in advance
- Hyflex
Sub testmacro()
'Switch Sheets'
Sheets("MAINSHEET").Activate
'Set Last Row'
LastRow = Range("A104856").End(xlUp).Row
Dim cl As Variant
For Each cl In Sheets("MAINSHEET").Range("ADM19:ADM" & LastRow).SpecialCells(xlCellTypeConstants, xlNumbers)
If IsNumeric(cl.Value) Then
cl.Offset(0, -786).Value = cl.Value
End If
Next cl
For Each cl In Sheets("MAINSHEET").Range("ADN19:ADN" & LastRow).SpecialCells(xlCellTypeConstants, xlNumbers)
If IsNumeric(cl.Value) Then
cl.Offset(0, -786).Value = cl.Value
End If
Next cl
For Each cl In Sheets("MAINSHEET").Range("ADO19:ADO" & LastRow).SpecialCells(xlCellTypeConstants, xlNumbers)
If IsNumeric(cl.Value) Then
cl.Offset(0, -786).Value = cl.Value
End If
Next cl
For Each cl In Sheets("MAINSHEET").Range("ADP19:ADP" & LastRow).SpecialCells(xlCellTypeConstants, xlNumbers)
If IsNumeric(cl.Value) Then
cl.Offset(0, -786).Value = cl.Value
End If
Next cl
For Each cl In Sheets("MAINSHEET").Range("ADQ19:ADQ" & LastRow).SpecialCells(xlCellTypeConstants, xlNumbers)
If IsNumeric(cl.Value) Then
cl.Offset(0, -786).Value = cl.Value
End If
Next cl
For Each cl In Sheets("MAINSHEET").Range("ADR19:ADR" & LastRow).SpecialCells(xlCellTypeConstants, xlNumbers)
If IsNumeric(cl.Value) Then
cl.Offset(0, -786).Value = cl.Value
End If
Next cl
For Each cl In Sheets("MAINSHEET").Range("ADS19:ADS" & LastRow).SpecialCells(xlCellTypeConstants, xlNumbers)
If IsNumeric(cl.Value) Then
cl.Offset(0, -786).Value = cl.Value
End If
Next cl
For Each cl In Sheets("MAINSHEET").Range("ADT19:ADT" & LastRow).SpecialCells(xlCellTypeConstants, xlNumbers)
If IsNumeric(cl.Value) Then
cl.Offset(0, -786).Value = cl.Value
End If
Next cl
For Each cl In Sheets("MAINSHEET").Range("ADV19:ADV" & LastRow).SpecialCells(xlCellTypeConstants, xlNumbers)
If IsNumeric(cl.Value) Then
cl.Offset(0, -786).Value = cl.Value
End If
Next cl
For Each cl In Sheets("MAINSHEET").Range("ADW19:ADW" & LastRow).SpecialCells(xlCellTypeConstants, xlNumbers)
If IsNumeric(cl.Value) Then
cl.Offset(0, -786).Value = cl.Value
End If
Next cl
End Sub
Bookmarks