View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default Convert Excel Functions to VBA Macro Function

Hi Simon
there's no easy way. You have to rewrite this in VBA depending on your
requirements. You may post what you want to achieve.

--
Regards
Frank Kabel
Frankfurt, Germany


Simon Corner wrote:
I regularly write long nested Excel functions, is there an easy way

to
convert a function that I have made work in Excel into a custom
function without having to rewrite the whole thing into VBA?

Here is an example function:


=IF(LEFT($A6)=TEXT(O$3,0),REPLACE(REPLACE(IF(LEFT( $A6)=TEXT(O$3,0),REPL
ACE($A6,1,1,""),""),1,FIND("
- ",IF(LEFT($A6)=TEXT(O$3,0),REPLACE($A6,1,1,""),"") )+2,""),FIND(" -
",REPLACE(IF(LEFT($A6)=TEXT(O$3,0),REPLACE($A6,1,1 ,""),""),1,FIND(" -

",IF(LEFT($A6)=TEXT(O$3,0),REPLACE($A6,1,1,""),"") )+2,"")),1000,""),"")

Any help would be greatly appreciated.

Simon Corner