View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
David Byrne David Byrne is offline
external usenet poster
 
Posts: 1
Default Cell Formula to run VBA code

"Frank Kabel" wrote in message ...
Hi
you can create a user defined function
e.g.
Public Function foo()
'some code
foo = some value
end function

Now you can use
=IF(D5="", "", FOO())


Or perhaps even simpler

=FOO(D5,...)

David