View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Anand the Smarty Anand the Smarty is offline
external usenet poster
 
Posts: 1
Default How to call Macro in UDF

Dear Excel Genius guys

i have a small query
can there be Numberformat in UDF (User Defined Function)

My VBA Code is

Function Crore (Selcell as variant)
crore=selcell/10000000
end function

now i want that at the same time its number format should also changed
& show us
"#,#00.000[$ Cr.]" 2 Cr.

now for that i have macro

sub crnumberformat()
ActiveCell.NumberFormat = "#,#00.000[$ Cr.]"
end sub

my query is how to call a macro in function