SOLVED

Formula for total dependent on value of a cell

Copper Contributor

Hi 

Is it possible to enter a formula that totals a column, but is dependent on another number in each row as to whether it is included in the total?

 

I have recreated a simple table to demonstrate my ask below….

 

I have a spreadsheet with many items relating to 2 cost centres (123456 and 654321), with a total at the end per cost centre and a total combined.

 

The formula i’d like would be that if a cost centre is changed from 123456 to 654321 (or vice versa), that the totals are able to identify this change automatically. Is there a formula that would cater for this please?

 

6D24EEA6-569C-409C-AA7D-84721AE3C153.jpeg

Kind regards

Maz

2 Replies
best response confirmed by Mazzarougle (Copper Contributor)
Solution

@Mazzarougle 

=SUMIF($A$2:$A$5,$A8,B$2:B$5)

You can try this formula which is in cell B8 and filled across range B8:E9.

sumif.JPG 

Amazing, thank you so much!!
1 best response

Accepted Solutions
best response confirmed by Mazzarougle (Copper Contributor)
Solution

@Mazzarougle 

=SUMIF($A$2:$A$5,$A8,B$2:B$5)

You can try this formula which is in cell B8 and filled across range B8:E9.

sumif.JPG 

View solution in original post