Tom’s Tutorials For Excel: Returning a Formula’s Arguments
I saw a question last year on one of the Excel newsgroups, asking for a way to return a formula’s arguments. I wondered, as you probably are, why this person wanted such a thing.
Still, I was intrigued at the question, so I answered it with the below User Defined Function that’s demonstrated by example in the picture.
The User Defined Function in pink cell E4 is
Here is the User Defined Function code:
Function Arguments(rng As Range) As String Dim strFormula$ strFormula = rng.Formula With WorksheetFunction Arguments = _ Mid(strFormula, .Search("(", strFormula) + 1, _ .Search(")", strFormula) - .Search("(", strFormula) - 1) End With End Function