Here’s a question for the Excel gurus out there. If’ I’m doing a SumIf formula, I can’t get it to add ranges. It only adds the first column in the range.
What I’m looking for is the sum of all for quarters for the criteria of Cheese, but it doesn’t work. If I use =sum and use a range, it’ll add everything up, but not with the criteria in place.
Munch - Because it ticks me off that the formula asks for a range and then doesn’t deliver. I thought I was doing something wrong. It may have to be the way I go, though. I’m setting this up for a group of users and hoped that all I’d have to give them is a formula.
Clicking on the help feature, it says the range and sum_range must have the same dimensions. E.g. if you want it to sum components in 3 columns then your condition range must look at 3 columns and each column must have the condition you want to check.
Sumif’s very powerful and easily my favorite function for querying data. Using columns with concatenated strings, it can give you pivottable-like outputs without the hassle of a pivot table, but yes, it has it’s limitations.
condition condition condition sum sum sum
range range range range range range
A A B_________________1 1 1
A A B_________________1 1 1
A A B_________________1 1 1
A A B_________________1 1 1
Kinthalis - How else would you add a range for criteria? Based on my sample, if you wanted to be aboe to just see your annual sales for cheese, how would you do it. In my real-life situation, there can be thousands of rows and about 8 colums to total. I don’t need the total of all items, just certain ones.
Munch - The actual spreadsheet had a list of transactions, trans types, balances, and aging buckets. So you have invoice 1234 for $150 which is 30 days past due. And credit memo 4321 for -$90 which is 150 days old, etc. Thousands of transactions. The users have to balance each trans type and then import the spreadsheet to Access. Only they have trouble making sure everything balances. So my plan was to make formulas for each group of transactions (or combinations of groups) and sum the balance column and the aging group columns. That way they can make sure they’re balanced before they import to Access.
It’s been a sort of tempest in a teapot here that out of maybe 400 reports imported per month, maybe 5 aren’t balancing. I’m trying to make it foolproof. Which isn’t easy, seeing the folks I work with.
Dude, you can pivot the ever-loving fuck out of the original table. You can pivot that motherfucker till the cows come home and demand that you pivot the fuck out of them too!
Er, I mean, OP, use a pivot table, they’re very easy to use in Office 2007 and up.
amorone -When I apply that formula to my example above, it gives me the total of B:E, not taking out the non-cheese item. So it gives me 685, when the total should be 185.
It makes the formula apply to an array. They are called array formulas or CSE formulas (CSE = Ctrl Shift Enter). The operation is then performed against each element in the array. Basically, you can write one formula instead of having to repeat it for row after row (or column after column).