try this
Sub Numberformat()
numrows = 10
numCols = 10
For rownum = 1 To numrows
For colnum = 1 To numCols
If Cells(rownum, colnum) < 10 Then
Cells(rownum, colnum).Numberformat = "0.00"
Else
Cells(rownum, colnum).Numberformat = "0.000"
End If
Next colnum
Next rownum
End Sub
I solved it myself but thanks anyway David (Apparantly i presenterd my problem inaccurate)!Heres my solution if it is helpful for anyone...
Range("j5:o60").Select
Dim Cell As Range
For Each Cell In Selection
Select Case Cell
Case "" 'värdet är precis 10
Cell.NumberFormat = "##0"
Case Is > 10 'värdet är större än 10
Cell.NumberFormat = "##0"
Case Is < 10
Cell.NumberFormat = "##0.0"
Case Else
Cell.NumberFormat = "##0.0"
End Select
Next
End Sub