Option Explicit
Sub test()
'Erik Van Geit
'code will BUG if some cells are containing errors like #NAME, #ISNA, etcetera, enable 'On Error'lines
Dim rng As Range
Dim arr As Variant
Dim i As Long
Dim r As Long
Dim ColArr As Variant
Dim FormatArr As Variant
Dim LR As Long
'EDIT
'put all columns in the array
ColArr = Array(2, 4, 7)
FormatArr = Array("General", "0.00", "0.00%")
'define first row
Const FR = 2
'END EDIT
With ActiveSheet.Cells
LR = .Find("*", .Cells(1, 1), xlFormulas, xlPart, xlByRows, xlPrevious, False, False).Row
End With
'On Error Resume Next
For i = 0 To UBound(ColArr)
Set rng = Range(Cells(FR, ColArr(i)), Cells(LR, ColArr(i)))
arr = rng
For r = 1 To UBound(arr)
arr(r, 1) = --arr(r, 1)
Next r
With rng
.NumberFormat = FormatArr(i)
.Value = arr
End With
Next i
'On Error GoTo 0
Erase arr
End Sub