Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default 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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I pass arguments to my formatted empty spreadsheet file? Paul H[_2_] Excel Discussion (Misc queries) 3 July 25th 09 07:34 PM
function arguments Oregongal35 Excel Discussion (Misc queries) 7 November 14th 08 06:32 PM
IF function with too many arguments ahutyra Excel Worksheet Functions 3 August 8th 08 02:01 AM
Showing Error when going to pass a function like this Brahmananda Mohanty Excel Worksheet Functions 1 May 6th 07 07:50 AM
Pass variable to NORMINSV function to get only mean value ExcelMonkey Excel Worksheet Functions 3 June 19th 06 06:01 PM


All times are GMT +1. The time now is 06:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"