Thread
:
How to make a VBA Function return a value in percent format
View Single Post
#
6
Posted to microsoft.public.excel.programming
John Black
external usenet poster
Posts: 9
How to make a VBA Function return a value in percent format
In article ,
says...
John,
This should work, but it will return a string.
Function GP(Val1 As Double, Val2 As Double)
GP = Format((Val2 - Val1) / Val1, "%0.00")
End Function
Having it return a string may be a problem in some cases. But for grins, I tried this and it
output this:
%0.10
:-)
John Black
Reply With Quote
John Black
View Public Profile
Find all posts by John Black