Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
excel novice
 
Posts: n/a
Default dynamic cell references

Hello everyone,

I'm a relative novice in terms of Excel and I have a problem that I
hope someone can help with.

I'm basically using a SUMIF formula (in book1) to calculate a total
using data from book2.

e.g.

SUMIF ('[book2.xls]sheet'!$A$1:$A$1000, B1 ,
'[book2.xls]sheet'!$J$1:$J$1000)

i.e. the formula will sum the values in column 'J' where the search
criteria is satisfied.

The problem is that I want to vary the value range to use for the
totalling so that in the formula the reference to column 'J' is
replaced by a value that is stored in (e.g.) cell 'L1'. In that way I'm
hoping to allow the value of cell 'L1' to control which data is used
for totalling.

Any offers?

  #2   Report Post  
Ruthki
 
Posts: n/a
Default


Instead of

SUMIF ('[book2.xls]sheet'!$A$1:$A$1000, B1 ,
'[book2.xls]sheet'!$J$1:$J$1000)

Try replacing the j1:j1000 with

Indirect(L1)

Then give names to the various ranges that are alternatives to j1:j100
(insert, name define) and enter the name of the range in L1. The
formula will then work on which ever range is named in L1.


the ranges named must be the same size as A1:a1000.


--
Ruthki
------------------------------------------------------------------------
Ruthki's Profile: http://www.excelforum.com/member.php...o&userid=24503
View this thread: http://www.excelforum.com/showthread...hreadid=386387

  #3   Report Post  
excel novice
 
Posts: n/a
Default

Your solution worked just fine.

Thanks very much.

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
How can we formular a dynamic cell? i.e. =B2 as ="B"&"2"?? qatest Excel Worksheet Functions 6 June 15th 05 09:49 PM
Cell references change when entering new data [email protected] New Users to Excel 2 May 6th 05 07:48 PM
Changing cell references automatically Bigweed New Users to Excel 3 April 28th 05 12:27 PM
Relative Cell References within VBA code Jandy Excel Discussion (Misc queries) 2 April 21st 05 02:17 AM
Syntax for inferred cell references donesquire Excel Worksheet Functions 4 April 4th 05 09:29 PM


All times are GMT +1. The time now is 05:07 AM.

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

About Us

"It's about Microsoft Excel"