SOLVED

Using Embedded functions

Copper Contributor

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

2 Replies
best response confirmed by Stuart_Ballinger (Copper Contributor)
Solution

@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.

That works great. Thank you very much :)
1 best response

Accepted Solutions
best response confirmed by Stuart_Ballinger (Copper Contributor)
Solution

@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.

View solution in original post