[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Sumifs with more than one column as sum range

Posted on 2015-01-27
6
Medium Priority
?
168 Views
Last Modified: 2015-02-24
Hi Experts,

I have an excel spreadsheet with three tabs: Summary, Data and Settings.

In the summary tab i want to use a a formula that shows balances across the columns per each account in each row. The formula will read from the data tab where I have define names for each column as Per1, Per2, Per3.

so, the summary tab will return Bal_2 as the sum of Per1 and Per2; Bal_3 as the sum of Per1...Per3

I have used sum products and sumifs, but I think the issue I have is that sumifs won't sum range more than one column. See my spreadsheet  attached.
test.xlsx
0
Comment
Question by:Pachecda
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 27

Expert Comment

by:ProfessorJimJam
ID: 40574114
you made that over complicated with so many confusing named ranges.

here is the solution you need. see attached.
test.xlsx
0
 

Author Comment

by:Pachecda
ID: 40574155
HI ProfessorJimjam.

I saw the spreadsheet with the updated formulas and I see that your solution is adding the current period plus the previous column balance as seen in the "+sum(C2:C2)". However, I was hoping for a more dynamic array as the formula below is dependent upon the previous column, which it may not work if the defined names are shuffled around the columns.

Your suggested formula: SUMPRODUCT(INDIRECT(D$1),--ISNUMBER(MATCH(Account,$A2,0)))+SUM(C2:C2)

In theory, I was thinking to have a defined name Bal_2 (_Per_1+_Per_2)

Bal_2 = Per_1+Per_2
Bal_3=Per_1+Per_2+Per_3
....etc
I sure hope there is another way where the balances are not relying on a previous column.
0
 
LVL 33

Expert Comment

by:Rob Henson
ID: 40575084
See attached.

On Data tab I have added 12 columns to the right which is the cumulative total to date for each row.

The summary tab then uses a SUMIF formula on account and sums the individual cumulative columns.

If your headers were dates rather than Period headings, you could use a two directional SUMIFS, ie look top to bottom in column A for Account number and look left to right in lets say row 1 for a date and only add up where less than or equal to specified date for column in Summary. I think that would work. Edit: Scrap that bit, just tried and wouldn't work.

Hope this helps.
Rob H
test1.xlsx
0
 

Accepted Solution

by:
Pachecda earned 0 total points
ID: 40575544
Hi Rob,

Thanks for your help on this. Although creating the additional twelve columns for cumulative balances works, I was hoping to be able to this via an array and defined names rather than relying on additional twelve columns for cumulative balances.

Last night I took a different approach and used the array formula {=sum(if((Accounts=account),Bal_2))} where "Bal_2" is a defined name with the sum of Indirect (_Per_1)+indirect(_Per_2).  The formula works like a charm, the only issue is that now I want to make the "Bal_2"  to be referenced to another cell where the user chooses what balance to analyse, and I can't seem to make it work.

Then I thought, if the array formula above works, why wouldn't the sumproduct or the sumifs work. So, I created two additional summary tables right below the array formulas for comparison and it seems two work for Bal_1, but not for the other balances.

Please see the attached file and you will see that I tried to compare the three different formulas using the same approach with the defined names.
test2.xlsx
0
 
LVL 49

Expert Comment

by:Martin Liss
ID: 40627777
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question