Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
katarina07
 
Posts: n/a
Default text as an argument of SUM function


Hello,
I have this function entered in a cell:

=SUM('X1:X30'!A1)

it sums values of all A1 cells from sheets between X1 and X30.
The problem is if I insert rows in these "X" sheets (because the
structure of a sheet has to be changed for some reason),
the above mentioned formula (on a consolidation sheet) doesnt reflect
this change, it still references A1, even if I shift this cell too.

I had an idea I could make it like:

=SUM("'X1:X3'!A" & ROW())

so that the range inside SUM changes dynamically, but the SUM doesnt
process this text value and returns #VALUE!.

Anybody has idea how to make SUM recognize this argument, may be
through some conversion or making a range reference out of this text
value.

Thanks, Katarina


--
katarina07
------------------------------------------------------------------------
katarina07's Profile: http://www.excelforum.com/member.php...o&userid=28385
View this thread: http://www.excelforum.com/showthread...hreadid=479726

  #2   Report Post  
William Horton
 
Posts: n/a
Default text as an argument of SUM function

I don't believe you are truly using Excel's consolidation functionality.
Click on the cell where you want the answer to be. Then follow the menu path
Data / Consolidate. Choose the appropriate function (Sum). If there is
anything in the All References section, delete them. Then 1 at a time add
the references you need (X1!$A$1, X2!$A$1, X3!$A$1, etc....). Then ENSURE
YOU CHECK the create links to source data box. That way when the values
change so will your answer. You can uncheck both the top row and left column
check boxes. Click OK and your answer should appear. Then if you go into
sheet X1 for example and add some rows before row 1 making cell A1 now
something like A5 your answer will still reflect the proper answer. it will
know to look at X1!A5, X1!A1, etc....

Play around with the data consolidate functionality and review Excel's help
on it.

Hope this helps.

Bill Horton

"katarina07" wrote:


Hello,
I have this function entered in a cell:

=SUM('X1:X30'!A1)

it sums values of all A1 cells from sheets between X1 and X30.
The problem is if I insert rows in these "X" sheets (because the
structure of a sheet has to be changed for some reason),
the above mentioned formula (on a consolidation sheet) doesnt reflect
this change, it still references A1, even if I shift this cell too.

I had an idea I could make it like:

=SUM("'X1:X3'!A" & ROW())

so that the range inside SUM changes dynamically, but the SUM doesnt
process this text value and returns #VALUE!.

Anybody has idea how to make SUM recognize this argument, may be
through some conversion or making a range reference out of this text
value.

Thanks, Katarina


--
katarina07
------------------------------------------------------------------------
katarina07's Profile: http://www.excelforum.com/member.php...o&userid=28385
View this thread: http://www.excelforum.com/showthread...hreadid=479726


  #3   Report Post  
 
Posts: n/a
Default text as an argument of SUM function

Have a look at the Indirect() function in help

eg.
=SUM(INDIRECT("'X1:X3'!A" & ROW()))

hth RES
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
Countif function for instances of text string contained Garbunkel Excel Worksheet Functions 1 October 11th 05 08:09 AM
Text Function with Different Formatting for Number MKenworthy Excel Discussion (Misc queries) 1 September 1st 05 11:34 PM
Formulas dealing with text data Bagia Excel Worksheet Functions 6 June 20th 05 10:29 PM
Automatically up date time in a cell Mark Excel Discussion (Misc queries) 5 May 12th 05 12:26 AM
Excel IF function for text BarnyardJoe Excel Worksheet Functions 2 December 10th 04 04:11 PM


All times are GMT +1. The time now is 07:17 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"