I am using following formula to calculate sum based on multiple sheets, here is the scenario
Total 2 sheets, Data and Translation,
In Data sheet i have employee name in C Column, Hours in J column,
In Translation sheet i have Department in A Column, Employee name in C column, and Rate in E column, so i have Department name, from that name i need to calculate total $ spent,
I have following formula, that will capture total rate (COUNTIF(H7,Translation!$A$2:$A$27)*Translation!$E$2:$E$27)
but its not calculating total hours (LOOKUP(IF(H7=Translation!$A$2:$A$27,Translation!$C$2:$C$27),'Data '!$C$2:$C$410,'Data '!$J$2:$J$410)
Please let me know
=SUMPRODUCT(IFERROR(LOOKUP(IF(H7=Translation!$A$2:$A$27,Translation!$C$2:$C$27),'Data '!$C$2:$C$410,'Data '!$J$2:$J$410),0)*COUNTIF(H7,Translation!$A$2:$A$27)*Translation!$E$2:$E$27)
You can't use LOOKUP here because the lookup range isn't sorted ascending - you can use SUMIF in place of LOOKUP, try this "array formula"
=SUM(SUMIF(Data!C2:C500,IF(B2=Translation!A2:A500,Translation!C2:C500),Data!J2:J500)*COUNTIF(B2,Translation!A2:A500)*Translation!E2:E500)
confirmed with CTRL+SHIFT+ENTER
Related
I am trying to create a calculation table for prices based on QTY and price break tier. I have an IF formula that doesn't seem to be working correctly and could use some help! Below I will post a screenshot of the table, the formula I am using, and amplifying details:
Price Break formula: =IF(H3<=24,C3,IF(25<=H3<=99,D3,IF(100<=H3<=499,E3,IF(500<=H3<=999,F3,IF(1000<=H3,G3)))))*H3
Amplifying Info: Column "H" is derived from a sum of "J:P". What I want to do is automatically calculate the total quantity requested (Column "H") and based off of that value calculate the total price of each item in Column "I". IE if the total QTY=1 the price would be 1xC (Associated cell C3:C14); If the QTY=600, then it would be 600xF. Currently the formula only works if I manually input "1" as the QTY and no other numbers work. Column "H" is set as number (though general did the same thing). If i place any other number or what the calculation comes out to it puts a dash as shown in the picture.
I'm not sure if there is better way to do this with VLOOKUP or another function?
Try using MATCH and CHOOSE:
=CHOOSE(MATCH(H2,{0,25,100,500,1000}),C2,D2,E2,F2,G2)*H2
The MATCH will compare the qty (in H2) to the values in the array ({0,25,100,500,1000}) and return a number (1 to 5).
The CHOOSE will then take this number and choose the nth value from the list of cells (C2,D2,E2,F2,G2)
We then multiply the value in the chosen cell by the quantity in H2
I have two spreadsheets and I want to sum up the total and then vlookup but when I do it I get 0 as a result.
Basically I have all 12 weeks, so I want to sum up all the numbers for "week 1" then vlookup the total to the other spreadsheet. the spreadsheet I want to sup up, so 7x10 = 70
the overview spreadsheet I want to get the "70" from week 1
You don't need a Vlookup, because you have many values for week 1, and no identifier for the week 1 total. Instead, on the summary sheet, you can use a Sumif() or Sumifs() function. Something along the lines of this:
=Sumifs(Sheet1!C:C,Sheet1!A:A,Sheet2!A3)
In words: Sum up all the values from Sheet1 in column C where column A in Sheet1 has the same value as cell A3 on Sheet2.
You need to adjust the sheet names and cell references to reflect your workbook.
With that approach, you do not need to enter weekly totals into your first sheet at all. It's not good practice to interrupt a table of data entry cells with formulas. It's better to do the reporting and analysis outside of the data entry table.
I would like to calculate the sum of a column total in a table, base on the name of the column header.
For example, below is a table of monthly sales by each person (from cell A4 to M7).
I would like to calculate the total monthly sales in Cell D13 with the month as an input variable (as in Cell B13).
My thought is =SUM(INDEX(B5:M7,MATCH(B13,B4:M4,0))) where I tried to use index and match function to find the range, then use sum function. It returns with an error and I am currently stuck here.
Your help is appreciated.
Using SUMPRODUCT function
In D13 enter formula :
=SUMPRODUCT((B4:M4=B13)*B5:M7)
I'm trying to create an Excel formula that is able to sum multiple rows in a table, where the rows and column to be summed are determined by the contents of other cells.
Ordinarily I would use Index Match Match to achieve this, but the multiple rows summation has left me stumped.
I've seen a couple of examples on here of Index Match with a SUMIFS formula, but nothing that pairs this with Index Match Match.
I have two tables on different Excel sheets. The first one looks a little this (the actual table is 105 columns x 200 rows):
That is from a sheet called "Firm Cost Summary". Row 4 contains a list of unique employee numbers. Column A is the expense category per our accounting system and Column B is a broader category that should be used in Excel to group similar items. Column E onwards then contains the numerical information to be aggregated.
What I would then like to do is summarise that table in a more presentable format that can then be manipulated in other ways. The table looks like this:
That is on a sheet called "Staff Cost Summary". I would like to fill out the info in the yellow cells, i.e. total the salary, bonus, benefits, etc, of each staff member. Ideally this would be a formula I input in cell E6 that I can then drag right and downwards to fill the table.
To give an example, to fill out cell I6 in the second table, the formula should look in cell A6 to find the employee number (1 in this case) and look this up in row 1 of the first table to find the appropriate column of the first table (column E in this case).
The formula should then look in cell I5 of the second table to see that we are looking to aggregate benefits, then look down column B of the first table to find each row that should be summed (rows 7-10 in this case).
With that in mind, here's what I've got:
=INDEX('Firm Cost Summary'!$A$4:$G$10,MATCH('Staff Cost Summary'!$A6,'Firm Cost Summary'!$A$4:$G$10,0),MATCH('Staff Cost Summary'!E$5,'Firm Cost Summary'!$B$4:$B$10,0))
Total benefits for Joe Bloggs are the sum of cell E7:E10 of table 1, i.e. 5 + 10 + 50 + 100 = 165.
Clearly there are multiple matches in column B of that table, so the above formula gives an answer of 0. Any ideas how I can tweak that to make it work?
Put this in E6 and copy over and down
=SUMIFS(INDEX('Firm Cost Summary'!$D:$DD,0,MATCH($A6,'Firm Cost Summary'!$D$4:$DD$4,0)),'Firm Cost Summary'!$B:$B,E$5)
The index/match returns the correct column to be added.
The Discount worksheet contains a two-dimensional table that has been set up to find the discount category of a ticket based on the weekday of travel and the fare category. In cell J3 of the Request worksheet, use the INDEX function to retrieve the discount category for this ticket, Copy down formula. I have =INDEX((Discounts!$A$4:$A$10,Discounts!$B$4:$D$10),4,2,2) but that isn't correct...First Table is Request TableDiscount Category Table
The syntax for the Index formula is:
(ARRAY, row num, column num)
Basically, an array is a rectangular shape of data. Row number tells excel whether to look in the 1st row, second row, third row, etc. Column num is the same thing for columns.
Your array should be Discounts!$A$4:$d$10
Let's say you're trying to find the discount for the first example (John Frasier)
Your row number is the day of the week, so it should equal h3.
Your column number is the fare category, so it should equal I3
Thus the whole formula should be
=index(Discounts!$A$4:$d$10,H3,I3)