(I might have used wrong terminology to frame question, and it would be great to be pointed at right question/answer.)
As shown in image I have a table. I want to sum all the values in "col2"
One way to do this is
=sum(B2:B4)
But I think a cleaner way to do this would involve somehow referring the column name in the formula, so that formula is more readable.
Is there a way to do it?
CodePudding user response:
Try this formula:
=SUM(INDIRECT("C"&MATCH("col2", 1:1, 0),FALSE))
Output:



