Hi just trying to run a code on every sheet in a workbook. For some reason it wont delete the column as specified. I've also tried using Columns(“A”).Delete and that did not work either
Sub Format()
'Firstly convert all text cells into number cells for every sheet in workbook
For Each WS In Sheets
On Error Resume Next
For Each r In WS.UsedRange.SpecialCells(xlCellTypeConstants)
If IsNumeric(r) Then r.Value = (r.Value) * 1
''Or test the values in the next column on the right
'If IsNumeric(r) Then r.Offset(0,1).Value = (r.Value)*1
Next r
Rows("1:15").Delete
Columns(“1”).Delete
Next WS
End Sub
Columns("A")would work, as long as you also specified the worksheet:ws.Columns("A").Delete