A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » Excel Discussion (Misc queries)
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

changing rows *and* columns in automatic formulae



 
 
Thread Tools Display Modes
  #1  
Old August 7th 12, 11:04 AM
richardstorm richardstorm is offline
Junior Member
 
First recorded activity by ExcelBanter: Aug 2012
Posts: 1
Default changing rows *and* columns in automatic formulae

Suppose I have an nxn square table; and I want to create a list that will tell me, for the jth row, the sum of the first j columns.

With what I know at the moment (pretty limited) I could enter a formula, and drag to get either a row or a column of data; but since I'm actually changing row-dependent and column-dependent info for each thing, either way I'm going to have to go through manually and either extend the range of the sum (if I'm dragging down to get a column) or change the row being summed (if I'm dragging across to get a row).

Is there any way to enter the formula so that, say, when I drag down to create a column of values, I don't have to go through and manually edit each one?

Thanks for any help - hope my explanation of the problem isn't too muddled!
Ads
  #2  
Old August 7th 12, 11:25 PM posted to microsoft.public.excel.misc
zvkmpw
external usenet poster
 
Posts: 114
Default changing rows *and* columns in automatic formulae

> Suppose I have an nxn square table; and I want to create a list that
> will tell me, for the jth row, the sum of the first j columns.
>
> Is there any way to enter the formula so that, say, when I drag down to
> create a column of values, I don't have to go through and manually edit
> each one?


Here's one way.

With the table starting in A1, and with the size (your "n") in N1, put this
=SUM(OFFSET($A$1,0,0,$N$1,ROW()))
in row 1 of some column and drag it down. Then the second cell down has the sum of the first two columns of the table; the third cell, three columns; etc.

Explanation: OFFSET() returns an array, and can be used as a function argument where an array is expected. The arguments of OFFSET() allow you to vary the placement of the array and its height and width.

Modify and expand as needed.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing Rows to Columns Xeralize New Users to Excel 0 June 13th 12 10:12 AM
Changing Columns to Rows MEAD5432 Excel Discussion (Misc queries) 3 October 31st 07 04:29 PM
Changing Rows into Columns GaryG Excel Discussion (Misc queries) 12 April 21st 06 12:10 PM
Automatic CSV saving pains - unwanted rows and columns 7below Excel Programming 1 January 30th 06 05:55 PM
Changing Columns to Rows jenbrunson Excel Discussion (Misc queries) 2 September 14th 05 03:31 PM


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


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