Sum variable range of column entries in offset cell #2

Hi chaps,
Many thanks those of you who tried to help with this question last week, but 
my simplified example wasn't good enough. I'll ask the question again but 
with a more detailed explanantion. Sorry for any induced headaches in advance.

I have 900 lines of data (A3:AT902). Below this I am using an INDIRECT 
formula to pull down (copy) certain lines from this mass of data (depending 
on certain entries within the data) into 60 separate tables below. First 
table (A915:AT943), second table (A951:AT979), etc. Much of the lines of data 
copied down into my 60 tables is numeric, and on these I then need to perform 
various sum, average, median and mode calculations (calcs on first table in 
AV916:CO943).

So from my first table (A915:AT943), my first formulas (AV916:AV943) need to 
find the sum of cells in column G one row above the formula cell and for a 
specified number of cells (e.g. 6 cells) above this. The number of cells that 
need including in the calculation is referenced from another worksheet (Admin 
sheet!$O$22).

In the example below (using my real table cell references), value in 'Admin 
sheet!'$O$22 is 6.

Formula in AV943 needs to sum the values in column G starting one row above 
Row 943 (in G942) for 6 cells (G937:G942) (answer 18).

Formula in AV942 needs to sum the values in column G starting one row above 
Row 942 (in G941) for 6 cells (G936:G941) (answer 19).

Etc.

If any cell in column G that is part of the calculation is blank, then the 
formula in column AV needs to return a blank also.



      A  -  G  -  AT       -           AV     -     CO

915        5
916        2                         Formula
917        0                         Formula
918        3                         Formula
-                                       -
936        2                         Formula
937        3                         Formula
938        5                         Formula
939        1                         Formula
940        1                         Formula
941        7                         Formula
942        1                         Formula
943        4                         Formula

Many thanks again for looking.

0
10/10/2009 4:25:01 PM
excel.newusers 15348 articles. 2 followers. Follow

2 Replies
660 Views

Similar Articles

[PageSpeed] 10

Some thoughts for these lines from your posting ..
> Formula in AV943 needs to sum the values in column G starting one row above 
> Row 943 (in G942) for 6 cells (G937:G942) (answer 18).
> 
> Formula in AV942 needs to sum the values in column G starting one row above 
> Row 942 (in G941) for 6 cells (G936:G941) (answer 19).

Maybe something simple like this using OFFSET would satisfy ..

In AV942: =SUM(OFFSET(G941,,,-6))
This returns the sum of G936:G941, ie 6 cells counting from the OFFSET's 
anchor G941 "up" (its "up" because of the negative "-6" used as the height 
param). 

Copy AV942 down 1 cell to AV943, 
which increments the formula to: =SUM(OFFSET(G942,,,-6))
hence returning what you specify above (for AV943), 
ie the sum of G937:G942

Any good? hit the YES below
-- 
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
0
demechanik (4694)
10/12/2009 6:49:01 AM
Hi Max,
Thanks for that, adapted it slightly for my circumstances and that works 
fine now.
Cheers

"Max" wrote:

> Some thoughts for these lines from your posting ..
> > Formula in AV943 needs to sum the values in column G starting one row above 
> > Row 943 (in G942) for 6 cells (G937:G942) (answer 18).
> > 
> > Formula in AV942 needs to sum the values in column G starting one row above 
> > Row 942 (in G941) for 6 cells (G936:G941) (answer 19).
> 
> Maybe something simple like this using OFFSET would satisfy ..
> 
> In AV942: =SUM(OFFSET(G941,,,-6))
> This returns the sum of G936:G941, ie 6 cells counting from the OFFSET's 
> anchor G941 "up" (its "up" because of the negative "-6" used as the height 
> param). 
> 
> Copy AV942 down 1 cell to AV943, 
> which increments the formula to: =SUM(OFFSET(G942,,,-6))
> hence returning what you specify above (for AV943), 
> ie the sum of G937:G942
> 
> Any good? hit the YES below
> -- 
> Max
> Singapore
> http://savefile.com/projects/236895
> Downloads:27,000 Files:200 Subscribers:70
> xdemechanik
> ---
0
10/12/2009 8:11:02 PM
Reply:

Similar Artilces:

How to perform sum sum sum...
How to perform sumation within that particular item but the item is not unique...means item 1 has its own quantity and same goes to item 2...but in the same table... -- Message posted via http://www.accessmonster.com On Tue, 17 Apr 2007 05:28:12 GMT, "EMILYTAN via AccessMonster.com" <u33296@uwe> wrote: >How to perform sumation within that particular item but the item is not >unique...means item 1 has its own quantity and same goes to item 2...but in >the same table... Group By the item. For a more detailed answer, please post a more detailed question (with a des...

In excel change color of a range of cells based on a cell value
Based on a cell value from a drop down box, how can you make a range of cells to change background color? Use the cell the box is linked to in your conditional formatting formula. If your box is tied to, say, A1, make sure the conditional formula is like: =$A$1="value" value is whatever will be selected in the box. Then set the background color. Squeaky "kwitt" wrote: > Based on a cell value from a drop down box, how can you make a range of cells > to change background color? ...

Not Auto-forwarding Spam Filtered by SpamBayes #2
I'm using SpamBayes on Outlook 2000 for Exchange Server. I have set an auto-forwarding rule. Currently this rule forwards all the messages including Certain Spam and Possible Spam messages as identified by SpamBayes to another e-mail address. I would, however, like to modify this rule such that Certain Spam will not be forwarded. Is there a way? ...

Referencing a sheet by taking its name from a cell
I'm not even sure the title of this post is correct but it's as clear as I could make it! I'm creating a summary sheet of data from many other worksheets. The worksheet names are mmm-yy (e.g. Nov-07). The top row of the summary sheet will contain those same names, with the summary data in the column below. I'm trying to find a way to reference the correct sheet by utilising the name in the top row. Something like ='A2'!C7 , I suppose, but this particular attempt didn't work. Can someone help? Thanks! Paul Assuming that you have "Nov-07"(sheet name) in...

Multiple variables to sort and sum, return values<0 with sum refer
Can anyone help me with this one please? I have this table of data. I'd like to be able to write a formula(s) which sums the No according to date and code, but then only returns a sum value (with the code and date in the two adjacent cells) if there is a value greater than 0. Code Ref No Date 1 G/032/05/999 400600 212 19/03/2010 2 G/032/03/001/999 400500 50 19/03/2010 3 G/032/02/001/001 400400 170 19/03/2010 4 G/032/05/999 400600 315 19/03/2010 5 G/032/03/001/999 400500 300 19/03/2010 6 G/032/05/999 400600 202 19/03/2010 7 G/032/03/001/002 40...

Replace variable row number in formulas
What I'm looking for is a macro that will replace the row number in a formula with a new number that I designate through an input box. Below is the code I have thus far. The problem lies in how I'm defining the integer portion of the formula that I want to replace - vbInteger (or vbLong) don't seem to work. Then finally I need to set Section 2 in a loop through Column CN. Any advice would be greatly appreciated! --------------------------------------------------------------------------------------------------------------------------- Sub UpdateFormulas_2() Dim LRowNumber ...

keeping one cell constant
if the formula is A1*A2 on the first row and for each other row i want B2, C2 etc to always be multiplied by A1 how can i do this. At the moment if i copy the formula from 1 row to the next it doesnt how the first as the constant. pls let me know the formula i need to use Try this: =$A$1*A2 And then look up the difference between relative and absolute cell references in the Help files. -- HTH, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup, so all may benefit ! ------------------------------------...

cannot import 2 entities during customization import
Updated VMs with customization files - everything went fine. Applied Rollup 2 to be sure nothing went poof. Then applied Rollup 2 to production - everything went fine. Attempted today to import customizations from Prod to VMs and on 2 customn entities I get the following error: A record with these values already exists. A duplicate record cannot be created. Select one or more unique values and try again. What to do now? -Melissa ...

nth cell in the range
Within a VBA Module, I would like to set the ith component of my array A(1 to N) to be equal to the 100*(nth cell in a column in excel). How can I do this within a loop? ** Posted via: http://www.ozgrid.com Excel Templates, Training, Add-ins & Software! http://www.ozgrid.com/Services/excel-software-categories.htm ** Hi try something like the following sub foo() dim c_values(1 to 100) dim i for i = 1 to 100 c_values(i)=activesheet.cells(i*100,"A").value next end sub >-----Original Message----- >Within a VBA Module, I would like to set the ith component of my array >...

Managing Lists #2
Thanks for your help guys. For future reference i applied the firs solution and it worked perfectly. Many thank -- iwilki ----------------------------------------------------------------------- iwilkin's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1607 View this thread: http://www.excelforum.com/showthread.php?threadid=27526 Glad to hear that ! Thanks for the feedback (from us) -- Rgds Max xl 97 --- Please respond in thread xdemechanik <at>yahoo<dot>com ---- "iwilkin" <iwilkin.1f8sda@excelforum-nospam.com> wrote in message news:...

2 questions #2
hello, Here is my first question,money plus keeps downloading my statement but will only use 1 payee.How do i fix this. Question 2 Money has decided that it will now import my statement for my checking account and put it into my savings account.How do i fix this I am using money plus deluxe version 17.0.120.1415 purchased in the us and i have been using this program for almost a year.Any help would be appreciated In microsoft.public.money, sondra99999 wrote: >hello, > Here is my first question,money plus keeps downloading my statement but >will only use 1 payee.How ...

Date-range specific report with counted results of combo box selections
Hi there, I'm a novice with Access, but am currently setting up a patient database for an NGO in India that I'm volunteering with. The primary reason for the database is to collect statistics quarterly. It is a simple database with one table that collects patient data from simple forms with some fields having combo boxes. Ultimately I want to generate reports that will show a summary of 'counts' of various fields for a given period. For example: In the table I have a combo box for where the person came from, with several options including - "Pick up Y. Bazar", &quo...

Summing up user defined results
Hi all - I'm new to VBA programming in Excel and so any help i'd totally love! I'm currently writing a function. Objective: user can select rows (do not have to be sequential). User clicks on button. UserForm appears with summed results from ONLY rows that he selected. What I have now, well it doesn't work: Sub Button6_Click() Dim i As Integer Dim totalNumbers As Integer Dim aRange As range For Each a In Selection.Areas 'MsgBox "Area " & i & " of the selection contains " & _ ' a.Rows.Count & " rows." &...

How to Combine Data from Several Columns?
Hi Everyone I have attached a file which contains what I need to resolve Basically, I need to combine the data in several columns together int one column. Is there a way I can do it with formulas or vb code? would really appreciate if any experts out there can help me. Thanks and Regards Kelvi Attachment filename: book1.xls Download attachment: http://www.excelforum.com/attachment.php?postid=46105 -- Message posted from http://www.ExcelForum.com Hi Kelvin! Probably the answer will be something like: =A1&" "&B1&" "&C1 ...

Free Entry or List?
Is it possible to configure a cell so that a user can enter EITHER a value OR select from a list of values? Thanks in advance! ...

pasting or moving formula cells without updating formulas
I have a flat spreadsheet with a results page at the end. The results page contains a set of formulae which refer to various cell locations within the body of the spreadsheet in order to return statistical results based on the values in said cells. Now I'd like to add more data to my spreadsheet, so i need to make it bigger; however, when I copy and paste, or select and drag the cells containing the formulae, Excel updates the formulae so that they refer to different cells which bear the same spatial relationship to the formulae as the original referees did before the formulae were ...

sum subform to form
=Sum([Forms]![frmCamPledgeList].[frmCamPledgeListSub].[Amount Pledged]) Form (frmCamPledgeList) with subform frmCamPledgeListSub). Subform has a field named Pledge Amount. I want to put a field on the form that gives me a total of the subform's Amount Pledged. I have tried the above, but I get an #error in the unbound text box. Do you need any more info? Any thoughts on why this does not work? Thanks in advance, Scott -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200912/1 The proper syntax is =Sum([Forms]![frmCa...

Special format for feet
Many html tables list height as x-yy where x is feet and yy is inches. Excel imports this as a date. In looking at cell number formats there is no option to display either a feet-inches 'number' or an inches number as x-yy. (I will write up a separate item about Excel importing the feet and inches as dates.) ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggesti...

variable allocation accounts #2
i want to setup and use variable allocation accounts for my company and on the help menu it says to go to cards>>financial>>variable allocation.... but i don't have that option in cards>>financial... is it something seperate i have to buy or a security setting or...???? thanks for you help! Josh, it's standard functionality in GP. Probably a security setting needs be changed so you can see it on the menu. Frank Hamelly, MCP-GP NOVA Solutions LLC Melbourne, FL ...

Calculate sum of a field within the query
I have a query that returns the details for a failure record during a specified time period. Where if I search between 1/1/08 and 1/31/08 the query returns the records of all failure records during that period. The row shows the part number and the total parts failed for that record. I need the query to then sum the total part failures for the previous 12 months. So I would see the following: Record # | part # | parts failed | Origination Date| Total Parts failed past 12 months 44444 | x | 4 | 1/2/08 | 200 44445 | Y |1 ...

Automatic filling of cells within a certain date range
Can someone please help, I have been stuck on this for the past two days... Column 'AB' has 'Start Date' and column 'AD' has 'Finish date' Row 19, cells 'AI' to 'DW' have the months written as 'J' 'F' 'M' 'A' etc.....from 2008 to 2015. I want to be able to enter a 'start date' in column 'AB' i.e. 1 January 2008 and a 'Finish date' in column 'AD' i.e. 1 April 2015. Then i would like the cells 'J - A' on row 19 to be filled with '1' in each month.... I...

using intersection of ranges
Need to specify the intersection of two named ranges, but require either one or both of them to be referenced to other cells. In other words, someone would enter the range which is one or both of the two, and I need the formula to look at that cell and use its name in the intersection argument. Any ideas? I have tried TEXT, but that doesn't seem to do it. Suppose the rangenames are rangeA and rangeB, and the names are in D2 and D3 =INDIRECT(D2) INDIRECT(D3) Note the spaces between the two functions; space is the intersection operator. Now you'll have to test for one or two...

Cells stay highlighted, cannot use mouse
When I click on a cell in excel, that cell shows as clicked on, but when I move the mouse all surrounding cells become highlighted as well. So I cannot input anything anywhere, as moving the mouse around just keeps highlighting cells. And I cannot shut excel down as trying to move the mouse to a menu bar keeps highlighting cells in the worksheet. The only way to get out of excel is to End Task. I have come across this problem before, but I don't know how I inadvertently activate it, and to stop it was some combined of Ctrl-Enter but I can't remember what. Hopefully someone will un...

how to make this work if sum=5+n2 then sum becomes the value of s.
I want to get or create a formula in excel or access that allows me to keep a running total of my supplies ie... I have 2 pens, remove one and receive 2. answer in the cell becomes 3 pens then if I zero out the received cell the inventory cell still remembers that I have 3 pens not 4 pens (because I received 2 more pens) and visa versa when I zero out the received cell it remembers I have 3 pens not 1 pen(because I removed 1 pen) I believe the method you suggest is flawed. You have no audit trail. If the number on the sheet doesn't match your actual inventory, how will you figure out...

Macro Not Working #2
Guys, many thanks for your help and suggestion my Macro now working. Having said that the same code works on my home PC but for some strang reason not on my Works PC - very Odd !! Thanks again Rob ; -- robertgu 44 Married two kid ----------------------------------------------------------------------- robertguy's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=596 View this thread: http://www.excelforum.com/showthread.php?threadid=26381 ...