Is it possible to call an excel function indirectly?
Hi,
Here is a VBA function to do what you want:
Function IndirectF(R As Range)
x = Evaluate("" & R & "(C1:C4)")
End Function
In the spreadsheet you want to calculate something for the range C1:C4
(change this to a range name if you want). In A1 enter AVERAGE, in another
cell enter =IndirectF(A1)
As you change the word in A1 the calculation will change.
--
If this helps, please click the Yes button.
Cheers,
Shane Devenshire
"Alban???" wrote:
Is it possible to use a referenced text cell in Excel to call up functions
form the cells that reference this text?
For example if in Cell A1 I have the text "Mode" can I use another cell say
C2 to reference that cell and produce the mode of a named range? And then, if
I were to change A1 to "Average" for C2 to display the average of the named
range?
|