Hi. Is there any way to use a formula (or simply a cell) in the reference name to another sheet?
For example, this formula takes the first enrolled student from a source file using a reference name called Module1_Name when there is a "Yes" in the Enrollment column:
=INDEX(COLLECT({Module1_Name}, {Module1_Enrollment}, "Yes"), 1)
Considering I have 12 modules and several other columns to pull out from the source sheet, I was thinking of using Summary sheet fields to make this operation easier. I have created a field called Module with the number 1 inside. I have tested the formula in a cell called [ColumnA]1 and it works well:
=("{"+"Module"+[Module]#+"_Name"+"}")
that generate this result:
{Module1_Name}
At this point, I tried to embed this formula into the first one in this way:
=INDEX(COLLECT(("{"+"Module"+[Module]#+"_Name"+"}"), {Module1_Enrollment}, "Yes"), 1)
but I get INCORRECT ARGUMENT SET.
This way:
=INDEX(COLLECT([ColumnA]1 , {Module1_Enrollment}, "Yes"), 1)
but I get INCORRECT ARGUMENT SET.
And this way
=INDEX(COLLECT({"Module"+[Module]#+"_Name"}, {Module1_Enrollment}, "Yes"), 1)
I got an empty cell but I guess it's because the reference name doesn't exist.
Any good idea to solve this problem?
thank you.