Excel Report - Excel Formulas - excel-formula

I am trying to formulate my data on a report in order to return the sum of items from column C based on the same item on column A and column B. For example:
http://i.stack.imgur.com/FadW7.png (I can't post the image because I don't have 10 reputation yet T.T)
On the above image, User "A" has used a Sum of data for "z1". I need to automatically grab a list of users per zones and sum the data for that user and that zone.
I have elementary experience with Excel (I can add formulas but I do not know what formula to write), any help would be greatly appreciated.
Regards,

You can use SUMIFS:
=SUMIFS($C$1:$C$16,$A$1:$A$16,"a",$B$1:$B$16,"z1")
(COLUMN TO SUM, COLUMN WITH 1ST CRITERIA, 1ST CRITERIA, COLUMN WITH 2ND CRITERIA, 2ND CRITERIA)
or
=SUMIFS($C$1:$C$16,$A$1:$A$16,G1,$B$1:$B$16,G2)
where Cells G1 and G2 are the user and zone respectively.
You'll also need to change the range of the cells in the columns.

Related

Sum specific values in the Grand Total row of a Pivot Table

Many thanks for your help in advance. I need help finding a way to sum specific values in the Grand Total row of a Pivot Table based on the corresponding column label. The challenge is that the row that the Grand Total is in isn't fixed, meaning in one instance the Grand Total may be in row 9, then after data addition/removal, it will be in a different row. Also, multiple columns match the criteria.
The attached image show what the Pivot Table looks like. I2 and J2 show the output I need regardless of which row the Grand Totals are in.
Credit to #DavidLead for pointing me in the right direction. The three screenshots attached to this answer are a supplement to the guide for using the GETPIVOTDATA formula in excel. I am using Excel 365.
In the first screenshot, you will see the raw data reformatted to have our columns, i.e. Name, B, A, and Month. Cell N2 shows the total/sum for A. in January and the formula is shown in the second screen capture, Cell O2 shows the sum/total for A. for all months combined. The formula is also shown in the second screenshot.
Regardless, you will see in the formulas for N2 and O2 that I reference the cell $G$1. This tells the formula which pivot table to look for the "A.". Then in the third position of the formula, I reference the Pivot field list column name "Month", and in the third position, I specify "January".
The formula can return 1 to 126 pairs of field names and item names that describe the data that you want to retrieve. In my case, I could have retrieved the total for John in January or for all months.
For example,
Total for John in January
=GETPIVOTDATA("A.",$G$1,"Month","January", "Names","John")
Total for John, January thru March
=GETPIVOTDATA("A.",$G$1,"Month","January", "Names","John")+GETPIVOTDATA("A.",$G$1,"Month","February", "Names","John")+GETPIVOTDATA("A.",$G$1,"Month","March", "Names","John")
The benefit of this formula is that if the Grand Total row changes I will always get the sum of A. and/or B. for all months. It is dynamic and is what I needed to accomplish.
Formula Explanation
`=GETPIVOTDATA("A.",$G$1,"Month","January")`
"A." = the column that has the data I need
$G$1 = the reference to the Pivot Table (Microsoft's
knowledge article states this can a reference to any cell, range of
cells, or named range of cells in a PivotTable. This information is
used to determine which PivotTable contains the data that you want to
retrieve.)
"Month" = the column I need
"January" = the name of the row for the total I need
To get the total for "A." from January thru March, I use the following formula:
=GETPIVOTDATA("A.",$G$1,"Month","January")+GETPIVOTDATA("A.",$G$1,"Month","February")+GETPIVOTDATA("A.",$G$1,"Month","March")
The most important factor of this formula is that you reference a cell in your pivot table. In my case, I used $G$1. I also tried other cells in the pivot table as reference cells, and the formula returned the correct values.
I hope this helps the next person who needs a similar solution and finds this answer. Please give this a vote if it helped you.
1st Screenshot
2nd Screenshot
3rd Screenshot

Have A Dynamic Sum Function in Excel

So, I feel like I'm trying to do something fairly simple in Excel here. My company has a Spreadsheet with 2 columns and an indefinite number of rows. Column A is the Date, Column B is a production number for that date. At the bottom of Column B is the total production number. However, every time we update the spreadsheet we have to update the formula to include the newest data on every page. We insert columns for the new dates, so is it possible to have a function that changes based on it's current coordinate? For example something like =SUM(B3:B(CurrentRow-1)).
Use this:
=SUM($B$3:INDEX(B:B,ROW()-1))
It is non volatile and will sum everything from B3 to the row in Column B above where the formula is placed.
Hi You can use the below excel formula to achieve the result you are looking at.
If the values you want to sum up is in column B, then type the below formula and it will show the value dynamically when ever you have added a value to the column.
=SUM(INDIRECT("B2:B"&COUNTA(B:B)-1))

sum column until blank cell total in different column

I need a sum of transactions to show up in a specific cell in order to use it to import the invoices.
I have a macro to insert a blank row between differing accounts and now i need a formula to sum that specific accounts transactions and place to total in column N.
Currently I have
=IF(F1="",SUM(F2:INDEX(F2:$F$600,MATCH(TRUE,(F3:$F$600=""),0))),"")
as the formula in N1. I'm using Excel 2007 and I'm not sure if that is the reason the index advise on other posts isn't working.
Any help would be much appreciated.
Use this non array formula in N1 put:
=IF(F1="",SUMIF(B:B,B2,F:F),"")

Key words and sum equations

Sample Page I have a spreadsheet That I am having trouble getting a formula running.
I have a table that has a handful of columns, being brand, description and sales.
I need to get a formula that will automatically find a keyword in column A and B and SUM all the totals to transfer to another worksheet.
Example I have 2 similar products by name, Demo Firm, and Demo Soft. I have them sorted into text to columns to make it easier to search. Demo in the 1st Column, Firm in the 2nd, Sales in the 3rd.
I need to be able to search all of column A and find every word "DEMO", then I need the formula to Search Colum B and Find all the "Firm", finally I need it to sum up the totals of Column 3 of "DEMO FIRM" and place the sum into Column4.
I have tried IFSUM, IFSUMS, and DSUM but I think I am missing one little step.
I hope this makes sense, in my head I know what I want to do, explaining it is difficult.
Thanks for your help. Will keep an eye on my email if further info needed.
I have uploaded an image of what I am needing (SAMPLE PAGE at top of post). The formula that was commented worked for a my small sample. I just need to make sure it will work on an ever changing spreadsheet.
If it is assumed that your data fills rows 2-10, i.e. A2:A10, etc., but obviously this can be changed as needed. As I understand it, you want to sum up all sales into Column D, based on the values in Column A and Column B. You can simply use a SUMIFS formula in Column D, in this case D2 and drag down for all rows, as follows:
=SUMIFS($C$2:$C$10, $A$2:$A$10, A2, $B$2:$B$10, B2)
So if A2 contains DEMO and B2 contains FIRM, then this formula will sum all of the sales totals in Column C where Column A contains DEMO and Column B contains FIRM.

Returning the column header of max value on per row basis

I have a spreadsheet whereby on a monthly basis I need to return the top product based on a table for that month. I have copied a screenshot of my current setup below.
I am currently doing this by creating an additional column (column H) which uses the INDEX, MATCH and MAX functions to return the name of the highest product in that row.
I then use another INDEX MATCH as a lookup in cells K4 and L4 to return the value for that month.
The problem is that my table expands each month as a new row is added and I wanted to find out if there was a way to combine both the formulas into one. So that all I would need to do is update the current and previous months in cells K3 and L3. I have the same setup across quite a few sheets so want to automate as much as possible.
Would love some help, ideally without using VBA if possible at all.
You could use this formula in K4 and drag it across to L4:
=INDEX($B1:$H1,1,MATCH(MAX(INDEX($B:$H,MATCH(K2,$A:$A,0),0)),INDEX($B:$H,MATCH(K2,$A:$A,0),0),0))

Resources