I just want to format TEST as a percentage in the following simple example. I cannot seem to get "NumberFormat" property to work. I'm new to excel so any help is appreciated.

Function TEST(x As Range) As Double

Dim cnt As Integer
Dim tmp As Double
Dim i As Integer

cnt = x.Cells.Count
tmp = 0

For i = 1 To cnt
tmp = tmp + x.Cells(i)
Next i

TEST = tmp


End Function