Forum Discussion
Using Embedded functions
Hi,
I want to have in cell A1 a function typed as a string such as Min.
In column C i have an array which for instance is (1,2,3,4,5,6,7)
In B1 i would like to say =A1&"(C:C) to find the minimum value but this can be variable so if i want to find max average etc.
is there a way of doing this?
Thanks in advance
Stuart_Ballinger If the variable functions you intend to choose from are in the list of function numbers used by AGGREGATE, you could do something like in the attached workbook.
Select the function to be used from the dropdown in A2. Then, B2 will find the function number. I've used MATCH, but you also use VLOOKUP, XLOOKUP or INDEX/MATCH, if you intend to use a shorter list of functions.
In C1, the AGGREGATE function is executed using the function number from B2.
2 Replies
- Riny_van_EekelenPlatinum Contributor
Stuart_Ballinger If the variable functions you intend to choose from are in the list of function numbers used by AGGREGATE, you could do something like in the attached workbook.
Select the function to be used from the dropdown in A2. Then, B2 will find the function number. I've used MATCH, but you also use VLOOKUP, XLOOKUP or INDEX/MATCH, if you intend to use a shorter list of functions.
In C1, the AGGREGATE function is executed using the function number from B2.
- Stuart_BallingerCopper ContributorThat works great. Thank you very much 🙂