Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default variable cell references

I have a large array (10x2200) of small integers. I have a second array of
three columns and about 200 rows. The first column of the second array has a
column number in the first big array (thus it has a value from 1 - 10) the
2nd and 3rd columns in the second array have a start and end row in the first
big array.

I would like to be able to compute the sum of the integers in the column
specified from the start row to the end row. For example if one of the rows
in the secord array has values 10 40 50 I want to compute the sum of rows 40
through 50 in column 10 of my big array.

I've tried the indirect function and the address function in various
combinations but cannot seem to get it right.
--
Thanks for your help - jjk98
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,069
Default variable cell references

Try

=SUM(INDIRECT("'Sheet1'!"&ADDRESS(B1,A1)&":"&ADDRE SS(C1,A1)))

In this example, the large array begins in A1 of Sheet1, and the small array
is in columns A, B, and C on another sheet, beginning in row 1. The formula
above would be entered in D1 of the small array sheet and copied down.

Hope this helps,

Hutch

"jjk98" wrote:

I have a large array (10x2200) of small integers. I have a second array of
three columns and about 200 rows. The first column of the second array has a
column number in the first big array (thus it has a value from 1 - 10) the
2nd and 3rd columns in the second array have a start and end row in the first
big array.

I would like to be able to compute the sum of the integers in the column
specified from the start row to the end row. For example if one of the rows
in the secord array has values 10 40 50 I want to compute the sum of rows 40
through 50 in column 10 of my big array.

I've tried the indirect function and the address function in various
combinations but cannot seem to get it right.
--
Thanks for your help - jjk98

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default variable cell references

Say the big array is in A1 to J2200.

The small array is in X1 to Z200.

Enter this in say AA1, and copy down to AA200:

=SUM(INDEX($A$1:$J$2200,Y1,X1):INDEX($A$1:$J$2200, Z1,X1))

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"jjk98" wrote in message
...
I have a large array (10x2200) of small integers. I have a second array of
three columns and about 200 rows. The first column of the second array has
a
column number in the first big array (thus it has a value from 1 - 10) the
2nd and 3rd columns in the second array have a start and end row in the
first
big array.

I would like to be able to compute the sum of the integers in the column
specified from the start row to the end row. For example if one of the
rows
in the secord array has values 10 40 50 I want to compute the sum of rows
40
through 50 in column 10 of my big array.

I've tried the indirect function and the address function in various
combinations but cannot seem to get it right.
--
Thanks for your help - jjk98



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default variable cell references

Should mention that if a cell is blank in the small array, the formula will
total the *entire* range of the missing cell, be it column or row.
--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"RagDyer" wrote in message
...
Say the big array is in A1 to J2200.

The small array is in X1 to Z200.

Enter this in say AA1, and copy down to AA200:

=SUM(INDEX($A$1:$J$2200,Y1,X1):INDEX($A$1:$J$2200, Z1,X1))

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"jjk98" wrote in message
...
I have a large array (10x2200) of small integers. I have a second array of
three columns and about 200 rows. The first column of the second array
has a
column number in the first big array (thus it has a value from 1 - 10)
the
2nd and 3rd columns in the second array have a start and end row in the
first
big array.

I would like to be able to compute the sum of the integers in the column
specified from the start row to the end row. For example if one of the
rows
in the secord array has values 10 40 50 I want to compute the sum of rows
40
through 50 in column 10 of my big array.

I've tried the indirect function and the address function in various
combinations but cannot seem to get it right.
--
Thanks for your help - jjk98





  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,073
Default variable cell references

On Apr 30, 7:17 am, jjk98 wrote:
I have a large array (10x2200) of small integers. I have a second array of
three columns and about 200 rows. The first column of the second array has a
column number in the first big array (thus it has a value from 1 - 10) the
2nd and 3rd columns in the second array have a start and end row in the first
big array.

I would like to be able to compute the sum of the integers in the column
specified from the start row to the end row. For example if one of the rows
in the secord array has values 10 40 50 I want to compute the sum of rows 40
through 50 in column 10 of my big array.

I've tried the indirect function and the address function in various
combinations but cannot seem to get it right.
--
Thanks for your help - jjk98


Say the top left cell (not heading) of the large array is Sheet1!$A$2,
and the first row of values in the second array is Sheet2!$A$2:$B$2,
then

=SUM(OFFSET(Sheet1!$A$2,B2-1,A2-1,C2-B2+1,1))

in Sheet2!$D$2 filled down to the bottom of the second array seems to
work.

Ken Johnson
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
Using variable cell references in Excel? eg A[B42] instead of A7 GlennC Excel Worksheet Functions 1 March 19th 08 08:29 PM
Help on index addressing using variable sheets & cell references Greggers Excel Worksheet Functions 3 September 4th 07 02:38 PM
Multiple or Variable cell references in Solver (Excel 97) Coreyhotlin Excel Worksheet Functions 1 February 14th 06 01:36 PM
variable cell references ???? kiethb Excel Discussion (Misc queries) 2 February 10th 06 08:22 PM
Creating cell references with variable values to use in Vlookup jackebro Excel Discussion (Misc queries) 2 December 14th 05 02:46 PM


All times are GMT +1. The time now is 04:04 PM.

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"