View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ben McClave Ben McClave is offline
external usenet poster
 
Posts: 173
Default How to make a VBA Function return a value in percent format

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