+ Reply to Thread
Results 1 to 9 of 9

Sum of all cells within an array that have a specific column and row

  1. #1
    Registered User
    Join Date
    12-21-2015
    Location
    Ft Worth, TX
    MS-Off Ver
    2013
    Posts
    3

    Sum of all cells within an array that have a specific column and row

    I have an interesting problem, and I feel like I'm over thinking it by too much...

    I need to return the sum of all values in a table that meet certain base criteria... I've attached an example.

    I need to return the sum so I can average all of the numbers together. The numbers are percentages, and I want the average percentage based on these values.

    In this example I want to return the Sum of all Cells that intersect with a column AND row that are = to A. Once I figure this out, I can apply it to my spreadsheet accordingly and do so for each... There are 9 potential references if that helps at all...
    Last edited by jtams; 12-21-2015 at 11:26 AM. Reason: Title Edit

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2407 (Windows 11 23H2 64-bit)
    Posts
    83,136

    Re: SUMIF, Index-Match, VLookup... not sure

    There is no attachment ...
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    12-21-2015
    Location
    Ft Worth, TX
    MS-Off Ver
    2013
    Posts
    3

    Re: SUMIF, Index-Match, VLookup... not sure

    Sorry about that, here is the attachment.
    Attached Files Attached Files

  4. #4
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: SUMIF, Index-Match, VLookup... not sure

    Welcome to the forum. It is always nice to see a new person posting.
    1. There isn't an attachment that you refer to.

    2. The Title should be what you are looking to do and not what you think the solution should be. This is Rule #1 of the forum
    "Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title go to your first post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)"

    To attach a file to your thread, follow these instructions:
    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  5. #5
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Sum of all cells within an array that have a specific column and row

    I could only get it to work by going through a helper range.

    So, row-wise, each column was compressed into a single cell by AVERAGEIF, then I ran AVERAGEIF on the helper row to get the single-cell output.

    (I couldn't get a clever array construction to work).
    Attached Files Attached Files
    Click the [* Add Reputation] Button to thank people for help!
    Post Attachment: Click [Go Advanced] under the reply box; then click [Manage Attachments] to launch the attachments dialogue.
    Mark Thread Solved: Go to the top of the first post; Select [Thread Tools] dropdown; Pick the [Mark thread as Solved] option.

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Sum of all cells within an array that have a specific column and row

    I'm just guessing here:
    A
    B
    C
    D
    E
    1
    A B C B
    2
    A
    25.00%
    50.00%
    75.00%
    80.00%
    3
    A
    80.00%
    20.00%
    25.00%
    37.00%
    4
    C
    50.00%
    36.00%
    80.00%
    60.00%
    5
    B
    21.00%
    90.00%
    45.00%
    30.00%
    6
    7
    A
    1.05
    0.7
    1
    1.17
    8
    =SUMIF($A2:$A5,$A7,B2:B5)

  7. #7
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Sum of all cells within an array that have a specific column and row

    This will give you the sum of the values at the intersection(s) of the value specified in A7
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If you enter A, you will get the sum of column A with both rows labelled A. If you enter B you will get the sum of the values that intersect column B and row(s) labelled B.
    A
    B
    C
    D
    E
    1
    A B C B
    2
    A
    25.00%
    50.00%
    75.00%
    80.00%
    3
    A
    80.00%
    20.00%
    25.00%
    37.00%
    4
    C
    50.00%
    36.00%
    80.00%
    60.00%
    5
    B
    21.00%
    90.00%
    45.00%
    30.00%
    6
    7
    A
    1.05

  8. #8
    Registered User
    Join Date
    12-21-2015
    Location
    Ft Worth, TX
    MS-Off Ver
    2013
    Posts
    3

    Re: Sum of all cells within an array that have a specific column and row

    The issue is, the rows and columns sometimes repeat in value. So, the rows could be:

    A, B, C, B, B, A, C

    And the Columns

    A, B, C, B, A, C, E

    I want a formula that will give me the sum of all the cells that are contained in a row that is labeled "B" and the Column is Labeled "B". If you apply the above values to a spreadsheet, you would get two different cells that meet the criteria of Column B and Row B, and I want to sum them. I can't do a linear sum, and VLookup only returns the value of the first instance... I want the sum of all instances (Index-Match has the same issue). I'll post a more detailed example of what I want (the actual spreadsheet I'm working on).

    I want to know what the average of all cells with Row = California and Column = California, but I want to be able to do that for all 8 instances in comparison to all 8 instances... Sometimes those instances happen more than once.
    Attached Files Attached Files
    Last edited by jtams; 12-21-2015 at 02:17 PM. Reason: Further clarification

  9. #9
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Sum of all cells within an array that have a specific column and row

    Select all the cells at the intersections of the states vertically and horizontally and give them the names of the state.
    Enter the name of the State interested in in A17. In B17 enter this formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    You could use a lookup table R2:S9 with the names of the states in the first column and in the second column the names of the states without spaces.
    The formula would then be:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    The sums would be:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] SumIF(Index(Match))
    By jo15765 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-06-2015, 12:21 PM
  2. [SOLVED] SUMIF with INDEX and MATCH
    By andikeep2580 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-03-2015, 11:29 PM
  3. Vlookup, Sumif, Index, Match ???? No idea where to start
    By tstjuste in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-28-2013, 11:20 AM
  4. Replies: 3
    Last Post: 05-08-2013, 02:10 PM
  5. [SOLVED] Sumif, Vlookup, Index/Match Issue?
    By marting in forum Excel General
    Replies: 5
    Last Post: 08-02-2012, 12:43 AM
  6. can i use sumif, index and match together?
    By go14344 in forum Excel General
    Replies: 2
    Last Post: 05-08-2012, 08:38 PM
  7. Index Match and SUMIF
    By xirokx in forum Excel General
    Replies: 3
    Last Post: 09-05-2008, 09:18 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1