![]() |
How to pass variables as arguments of a function
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. |
How to pass variables as arguments of a function
Try using INDIRECT() function
=SUM(INDIRECT("'" & A1 & "'!" & A2 & ":" & C1)) If this post helps click Yes --------------- Jacob Skaria "Excel-craze" wrote: 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. |
All times are GMT +1. The time now is 12:28 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com