Forum Discussion
Jimmyolo96
Dec 01, 2023Copper Contributor
Using a value in a cell as a sheet name in a function
Hi, I have a situation where i want to use a value in a cell (Cost Code - column F) as a sheet number in my function. In this example, i have sum + filter function where i am trying to sum all i...
- Dec 01, 2023
Hi Jimmyolo96
You have to use the INDIRECT function:
in E6 or wherever you want:
=SUM( FILTER( INDIRECT("'" & F6 & "'! H6:H15"), INDIRECT("'" & F6 & "'! A6:A15") = A6 ) )
Lorenzo
Dec 01, 2023Silver Contributor
Hi Jimmyolo96
You have to use the INDIRECT function:
in E6 or wherever you want:
=SUM(
FILTER(
INDIRECT("'" & F6 & "'! H6:H15"),
INDIRECT("'" & F6 & "'! A6:A15") = A6
)
)
Jimmyolo96
Dec 01, 2023Copper Contributor
it works! thank you so much!
- LorenzoDec 01, 2023Silver ContributorYou're welcome & Thanks for providing feedback