• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Convert Formula to function in vba

861171314

New Member
Hi Dears,
i Have a formula in excel and i want to convert it as vba function
it is my formula :
=LEFT(B13;FIND("-";B13;1)-1)
Can Anybody Help me ?
ThankYou
 
Code:
Function Split1(orng as range, optional del as string="-")as string
Split1 = split(orng.value, del)(0)
End function
 
thank you very much
i have two other formula to convert to function
can you help me how can i do this
=MID(B13;FIND("-";B13;1)+2;FIND("-";B13;FIND("-";B13;1)+1)-FIND("-";B13;1)-2)
and
=RIGHT(B13;LEN(B13)-FIND("&";SUBSTITUTE(B13;"-";"&";LEN(B13)-LEN(SUBSTITUTE(B13;"-";""))))-1)
 
Back
Top