Forum Discussion
joshman81
Mar 22, 2022Copper Contributor
using a formula to name a range
I would like to base the name of a range on the contents of another cell. The cell it will be named after just has text in it. Essentially I want the name of the group of cells to be "=A2" where A2 wo...
PeterBartholomew1
Mar 22, 2022Silver Contributor
As Riny_van_Eekelen says, not using a formula. It is possible to use VBA; I used it to work round the inadequacies of Name Manager when uploading Lambda functions.
ActiveWorkbook.Names.Add LambdaName, RefersToOtherwise, I would recommend applying Names at the level of 'StudentNames' and then using XLOOKUP to return the specific data range.
= XLOOKUP(Name,studentName, Grades)These days one could even use a Lambda function
= GradesĪ»(Name)
"GradesĪ»"
= LAMBDA(sn, XLOOKUP(sn,studentName, Grades))
- joshman81Mar 25, 2022Copper Contributor
PeterBartholomew1 Thanks for the help. Based on the feedback I ended up solving my problem using something other than the Names feature.