How to pass variables as arguments of a function

  • Thread starter Thread starter Excel-craze
  • Start date Start date
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.
 
Try using INDIRECT() function

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

If this post helps click Yes
 
Back
Top