How to pass variables as arguments of a function

E

Excel-craze

How to pass variables as arguments to a function call? For example, I want
to sum(Sheet1!E31:E38) where “Sheet1†is a variable while “E31:E38†is
another string variable to be concatenated with “Sheet1â€. I tried assigning
“Sheet1†to cell A1, “E31†to cell A2, “E38†to cell C1 and use the function
=sum(concatenate(A1,â€!â€,B1,â€â€:â€,C1)) but it did not work.
 
J

Jacob Skaria

Try using INDIRECT() function

=SUM(INDIRECT("'" & A1 & "'!" & A2 & ":" & C1))

If this post helps click Yes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top