I'm working on a spreadsheet that allows some basic collaborative hour tracking. Worksheet A contains an entity called Blocks where each block has a BlockID. Worksheet B contains line items. Each Line item has a BlockID and # of hours spent for that block. I would like to include the total hours spent per block (indicated in Worksheet B) in the Hours Spent column of Worksheet A. Is this possible?See sample screenshots:Worksheet AWorksheet BI wonder if the SUMIF function might be useful
How do I populate a cell in Worksheet A with aggregate data from Worksheet B?
google spreadsheets
A solution to this problem is to utilize the SUMIF function.=sumif('Hours Spent'!A3:A10001, A3, 'Hours Spent'!C3:C10001)What's going on here?We are referencing the other spreadsheet via the 'SheetName'! syntaxWe are only including rows in the sum if the value in column A in the hours spent worksheet equals the value in A3 in the current worksheet. This enforces our BlockID mapping.The final argument of the function indicates which column we are summing. ReferenceSUMIF