Thread: Simple SSN UDF
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
p45cal[_50_] p45cal[_50_] is offline
external usenet poster
 
Posts: 107
Default Simple SSN UDF

Function ssn(myrange As Range)
ssn = Format(myrange.Value, "000-00-0000")
End Function

--
p45cal


"ToddEZ" wrote:

Hello. I am struggling with my VBA knowledge. I would like to convert the
following formula into a UDF (=ssn(cell)), but I do not know what the code
will look like. Can anyone help?

Formula:
=text(cell, "000-00-0000")

Thanks!