Averaging multiple rows in Numbers '09

Hello all, my question is this:
Ive got a table with several thousand rows, and two columns. Column A is an identifier, and column B is a number associated with that identifier. However, there are some duplicates in column A, that have different respective numbers in column B. I want to go through these rows and average all values given for a certain duplicated identifier, and return that in a separate column. An illustration to explain better:
original table:
A B
b0003 4
b0003 5
b0003 4
b0001 1
b0002 2
output that i want:
A B
b0003 4.333
b0001 1
b0002 2
possible?

I can get you pretty close with the following:
C2=A2
C3=IF(A3="","",IF(COUNTIF(A$2:A2,A3)=0,A3,"")) fill down
D2=IF(C2="","",SUMIF(A,C2,B)/COUNTIF(A,C2)) fill down
This is if your data starts in row 2. It does not tighten it all up so the numbers are all together, there will be gaps if there are duplicate identifiers. If you did it in a separate table you could hide the blank rows.
Formula in column C determines if the identifier is duplicated in a row above. If so it leaves C blank. If not a duplicate it copies the identifier to C.
Formula in D says "if there is an identifier in C then add up all the values in column B for that identifier and divide by the number of times the identifier appears in column A. Otherwise leave D blank.

Similar Messages

  • How do I add multiple rows in Numbers for iPad?

    how do I add multiple rows in Numbers for iPad?

    Hi James,
    On the iPod I can only insert what is on the clipboard but I can insert however many rows I have there. Is it working differently for you? Benjoon seemed to think that he could not do this in Numbers. He was ruling Numbers out because of it. He doesn't need to do that because of this issue.
    If I was needing to insert multiple blank rows often I might keep a table of blank rows or just some blank rows at the end of the working table that I could copy/paste. This is no different than Numbers on the Mac.
    quinn

  • Averaging a row of numbers

    I want to average a row of numbers, but some of the cells are empty.  I want the empty cells to be considered null - not included in the averaging calculation.  Is there a way to do this?  I am using Numbers '08.

    Hi milkmaid,
    I am using Numbers '09 and I assume that the AVERAGE() function is the same in Numbers '08.
    AVERAGE() ignores cells that are blank, or contain text.
    In this screen shot, all the cells with yellow fill contain a formula to average all the cells to their left.
    In Row 2, Cell D2 contains the formula
    =AVERAGE(A2:C2)
    In Row 3, Cell E3 contains the formula
    =AVERAGE(A3:D3) and the blank cell in C3 is ignored ("null")
    In Row 4, Cell E4 contains the formula
    =AVERAGE(A4:D4) and the cell containing text is ignored.
    Try out these three scenarious and see if they work in Numbers '08.
    I don't know if Numbers '08 has a function browser. I do not have a copy of a User Guide for '08. Try the Help Menu.
    Regards,
    Ian.

  • How to paste multiple lines in multiple rows in Numbers

    Hi,
    I have a list of Items I would like to have in different row in Numbers. But when I paste the list (Item Name <carriage return>) in a Number cell but instead of spanning multiple rows, it all paste in the same cell with multiple lines.
    Is there a way to paste it in multiple rows or import it from a plain text file in Number the way I wish?
    Thanks

    Using your hint and Pages, I found my issue.
    That was because when paster in Pages, I saw a CR, that when pasted in Numbers resulted in a one cell with multiple lines in it.
    I used Pages to replace the CR by a paragraph code, and now it work just fine.
    Thanks

  • Finding and averaging multiple rows

    Hello,
    I am having a little problem and was wondering if anyone had any ideas on how to best solve it. 
    Here is the problem: 
    - I have a large file 6000 rows by 2500 columns. 
    - First I sort the file by columns 1 and 2
    - then I find that various rows in these two columns (1 and 2) have duplicate values, sometimes only twice, but sometimes three or four, or five or up to 9 times.
    - this duplication occurs in only the first two columns, but we don't know in which rows and we don't know how much duplication there is. The remaining columns, i.e. column 3 to column 2500, for the corresponding rows contain data.
    - Programatically, I would like to find the duplicated rows by searching columns 1 and 2 and when I find them, average the respective data for these rows in columns 3 to 2500.
    - So, once this is done I want to save the averaged data to file. In each row this file should have the name of colunm 1 and 2 and the averaged row values for columns 3 to 2500. So the file will have n rows by 2500 columns, where n will depend on how many duplicated rows there are in the original file.
    I hope that this makes sense. I have outlined the problem in a simple example below:
    In the example below we have two duplicates in rows 1 and 2 and four duplicates in rows 5 to 8.
    Example input file: 
    Col1 Col2 Col3 ... Col2500
    3 4 0.2 ... 0.5
    3 4 0.4 ... 0.8
    8 5 0.1 ... 0.4
    7 9 0.7 ... 0.9
    2 8 0.1 ... 0.5 
    2 8 0.5 ... 0.8
    2 8 0.3 ... 0.2
    2 8  0.6 ... 0.7
    6 9 0.9 ... 0.1
    So, based on the above example, the first two rows need averaging (two duplicates) as do rows 5 to 8 (four duplicates). The output file should look like this:
    Col1 Col2 Col3 ... Col2500
    3 4 0.3 ... 0.65
    8 5 0.1 ... 0.4
    7 9 0.7 ... 0.9
    2 8 0.375 ... 0.55
    6 9 0.9 ... 0.1
    Solved!
    Go to Solution.

    Well, here's an initial crack at it. The premise behind this
    solution is to not even bother with the sorting. Also, trying to read
    the whole file at once just leads to memory problems. The approach
    taken is to read the file in chunks (as lines) and then for each line
    create a lookup key to see if that particular line has the same first
    and second columns as one that we've previously encountered. A shift
    register is used to keep track of the unique "keys".
    This
    is only an initial attempt and has known issues. Since a Build Array is
    used to create the resulting output array the loop will slow down over
    time, though it may slow down, speed up, and slow down as LabVIEW
    performs internal memory management to allocate more memory for the
    resultant array. On the large 6000 x 2500 array it took several minutes on my computer. I did this on LabVIEW 8.2, and I know that LabVIEW 8.6
    has better memory management, so the performance will likely be
    different. 
    Attachments:
    Averaging rows.vi ‏30 KB

  • I am trying to average multiple cells including some blank cells.  How do I get numbers to assess a blank cell as zero and include that cell in the average?

    I am trying to average multiple cells including some blank cells.  How do I get numbers to assess a blank cell as zero and include that cell in the average?

    Hi rkcfizzle,
    Blanks
    Blanks = 0
    1
    1
    2
    2
    0
    3
    3
    2
    1.5
    AVERAGE ignores blank cells (Column A)
    Formula in Footer Cell A6
    =AVERAGE(A)
    If you want to include blank cells as zero, type this formula in B2 (and Fill Down)
    =IF(A2<>0,A2,0)
    Numbers 3 will change the formula to
    =IF(A2≠0,A2,0)
    Yeah, right! but that is Numbers 3.
    And the answer (6/4) is 1.5. Correct!
    Regards,
    Ian.

  • I need to Average multiple months.

    I am new to spreedsheets and I am makeing a sheet for my work and I need help.
    I am trying to average multiple cells as I enter new numbers in the cells per week.
    For example $100.00 in cell A1 200.00 in cell B1,C1:L1 are all blank until I enter new numbers. I want to calculate in cell C20 to average all the cells in the ones with $100.00,200.00 and the ones that are still blank. I'm trying to average my income per month and I want to see the average change when I enter new numbers. I tried to do this, I have 12 cells labeled Jan thru Dec using =Average(A1:L1). When I did this it divided the number I entered in cell A1 by 12. I want it to average just A1 then when I enter a number in B1 it will average A1 and B1. and so on and so forth.
    There is got to be a formula for this.
    Please help.
    Rick

    Hi CJ,
    First of all, if you're using row 1 and column A for calculations, make sure that these are not Header row and column cells. Open the Inspector and go to the Table inspector. Click on the Headers & Footer buttons until none of the three are highlighted (blue).
    Entering 100 in B2 and 200 in C2 and =AVERAGE(B2:M2) in another cell (D21, to keep the same relative position as you used, plus two other cells just to check), gave the correct 150 result.
    Entering 300 into D2 changed the average to 200, as it should.
    Entering a text character (a) in E2 made no change (AVERAGE() ignores text).
    Entering a zero in F2 changed the average to 150, as it should.
    If it's not a Header Row problem, the next best possibility is that your "blank" cells actually contain a zero.
    Regards,
    Barry

  • Web dynpro screen with multiple rows with columns that can be edited

    Web dynpro screen with multiple rows with columns that can be edited individually:
    Hi
    I am busy creating a screen in web dynpro for ABAP which we would like to make available via Portal ESS (Portal 7).
    I need to add 'n type of table (or almost something like Excel) or something in which someone can type a few paycode numbers (there should be lets say 10 blank rows in which info can be typed in and if I click on a button or so, more rows must be added if necessary.  Then in the other colums stuff like amounts must be entered which one should also be able to edit then and there.
    Can anyone assist in what I can use for this?  There does not seem to be some existing element that I can use.
    Help will be appreciated.
    Regards
    Debbie

    Hi Debbie,
    Whiel Creating table you need to be care full that use chose INPUT FIELD as the CELL EDITOR. Just guessing that if ur table is not editable u might have choosen TextView as default cell editor type.
    check link for details on TABLE UI
    [http://help.sap.com/saphelp_erp2005/helpdata/EN/b5/ac884118aa1709e10000000a155106/frameset.htm]
    easy way is to first add UI ELEMENT TABLE to your VIEW, then right click over it & select create binding from context. After you have a pop up where you can select what columns you want what should be its cell editor etc.
    Greetings
    Prashant

  • How do I automatically number rows in Numbers for iPad?

    How do I automatically number rows in Numbers for iPad?

    Hi James,
    On the iPod I can only insert what is on the clipboard but I can insert however many rows I have there. Is it working differently for you? Benjoon seemed to think that he could not do this in Numbers. He was ruling Numbers out because of it. He doesn't need to do that because of this issue.
    If I was needing to insert multiple blank rows often I might keep a table of blank rows or just some blank rows at the end of the working table that I could copy/paste. This is no different than Numbers on the Mac.
    quinn

  • After updating numbers and pages I can no longer copy multiple cells from numbers and paste and match style to pages.

    After updating numbers and pages I can no longer copy multiple cells from numbers and paste and match style to pages.  I used to be able to select multipule cells in a row (such as company name, address, etc.) then paste and match style on to a pages letter. I found the paste and match style option in the edit menu, however it will only work one cell at a time. Before the update is was working great.

    For diagnosing purpose thy the procedure in a new user account and see if it works there. You create a new user account in the System Preferences > Accounts. If it works in the new account it is probably a corrupt plist file that needs to be deleted.

  • How do I insert a row in Numbers?

    I see no function for the insertion of a row or column available.  Is it even possible?

    "There's a side tab to the box when you click on it.  I'm very new."
    It's called the Row Reference Tab for that row.
    Here are two other ways to insert a row into a Numbers table:
    Click any cell to select it. Go Table (menu) > Insert Row Above toinsert a row above the selected cell, or Go Table > Insert Row Below to insert a row below the selected cell.
    Click any cell to select it. Press option-up arrow OR option-down arrow to insert a row above or below the selected cell.
    To insert multiple rows, use a variation of the first method:
          Select a column of as many cells as you wish to add rows. Go Table > Insert Rows Above (or Below).
    I'll second Jerry's remarks regarding the Numbers '09 User Guide.
    Regards,
    Barry

  • Averaging a range of numbers

    I'm looking to try and average a range of numbers, but instead of doing it by certain rows (that is, average rows A1 through A30), I'd like for Numbers to average cells if they fall into a certain numerical range (that is, average cells whose values are 1-30, but whose rows might be A1 through A70 or A1 through A42--you don't know). Since my cells are numerically ordered, I could go through and find myself the cells that fall into the range (is it A70 or A42?), but I have a few thousand rows so that's really not economical in terms of time. Could someone help me to figure out the function to average cells based on their numerical value?
    Thanks!

    Here's how you might set up the formula:
    The formula in B3:
           =AVERAGEIFS(Table 1::A,Table 1::A,">"&B1,Table 1::A,"<"&B2)
    It's a little tricky because you need the " " in the proper places.  You could hardcode the values into the formula itself with something like ">0" and "<31" but it's generally good practice to put the conditions in cells so you can vary them as needed.
    SG

  • Inserting Multiple Rows

    Hi, I'm just evaluating Numbers and I can't figure out how to insert multiple rows within a set of existing rows. I can see how to add a single row above or below a row, but not how to open up a block to insert multiple rows.
    Many thanks, Jonathan

    Hi Mark,
    Thank you for the response. I hadn't looked at the "Table" menu, I was looking at the popup menu that appears at the front of the row - that menu continues just to offer 'add row'.
    It would be good if the help documentation included this information.
    Anyway, you tip solves the problem for me. Many thanks.

  • Delete from multiple rows elements from Array

    I have an array that contains about 3700 rows, and 4 columns. Every 37 rows a cycle of data begins. I would like to delete the first row of every cycle of data (i.e. row 1, row 38, row 75, row 111, etc -- until I have deleted every 37th row in the entire array). Then if possible I would like to take an average of rows 2 through 37, 39 through 74, 76 through 110, etc...
    Any help would be greatly appreciated.

    > After I modify the arrrays, I am displaying them both in lab view (in
    > multiple different graphs and a table), and then also using active X
    > to transfer the data to Excel (where is will be re-arranged and
    > plotted accordingly).
    >
    > I indeally need to get an average of the points in the array about
    > every 36 rows, and then display this, since I am looking to track the
    > output decay over time. If you have any suggestions as how I might
    > find and average of every x number of rows in an array, and either
    > input these into another array or a table, that would be greatly
    > appreciated.
    >
    I can't see the original post about the data shape, but if you have a 2D
    array, wire it into a For loop. Use i mod 36 equals 0 to select whether
    you
    add the array to the current total in the shift register, or whether
    you divide the total array by 36 and append it to the averages array,
    then overwrite the total to restart the process. If the rows isn't
    doesn't contain an integer multiple of 36 rows, you need to deal with
    the excess data either ignoring or making an average with a different
    denominator. I'd assume you do this outside the loop.
    Greg McKaskle

  • Insert multiple rows into a same table from a single record

    Hi All,
    I need to insert multiple rows into a same table from a single record. Here is what I am trying to do and I need your expertise. I am using Oracle 11g
    DataFile
    1,"1001,2001,3001,4001"
    2,"1002,2002,3002,4002"
    The data needs to be loaded as
    Field1      Field2
    1               1001
    1               2001
    1               3001
    1               4001
    2               1002
    2               2002
    2               3002
    2               4002
    Thanks

    You could use SQL*Loader to load the data into a staging table with a varray column, then use a SQL insert statement to distribute it to the destination table, as demonstrated below.
    SCOTT@orcl> host type test.dat
    1,"1001,2001,3001,4001"
    2,"1002,2002,3002,4002"
    SCOTT@orcl> host type test.ctl
    load data
    infile test.dat
    into table staging
    fields terminated by ','
    ( field1
    , numbers varray enclosed by '"' and '"' (x))
    SCOTT@orcl> create table staging
      2    (field1  number,
      3     numbers sys.odcinumberlist)
      4  /
    Table created.
    SCOTT@orcl> host sqlldr scott/tiger control=test.ctl log=test.log
    SQL*Loader: Release 11.2.0.1.0 - Production on Wed Dec 18 21:48:09 2013
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    Commit point reached - logical record count 2
    SCOTT@orcl> column numbers format a60
    SCOTT@orcl> select * from staging
      2  /
        FIELD1 NUMBERS
             1 ODCINUMBERLIST(1001, 2001, 3001, 4001)
             2 ODCINUMBERLIST(1002, 2002, 3002, 4002)
    2 rows selected.
    SCOTT@orcl> create table destination
      2    (field1  number,
      3     field2  number)
      4  /
    Table created.
    SCOTT@orcl> insert into destination
      2  select s.field1, t.column_value
      3  from   staging s, table (s.numbers) t
      4  /
    8 rows created.
    SCOTT@orcl> select * from destination
      2  /
        FIELD1     FIELD2
             1       1001
             1       2001
             1       3001
             1       4001
             2       1002
             2       2002
             2       3002
             2       4002
    8 rows selected.

Maybe you are looking for