Home > Enterprise >  How to add values in a range of cells if neighboring cell has a specific string value only those cel
How to add values in a range of cells if neighboring cell has a specific string value only those cel

Time:10-03

enter image description here

If the category matches the categories string value, how do I add the amount next to the category to the Totals for the categories legend

So far I've tried using the SUMIF() function.

CodePudding user response:

Try SUMIFS().

=SUMIFS(Table1[Amount],Table1[Category],[@Category])

enter image description here

CodePudding user response:

Try this:

sample excel file

Where the Excel table on the left is named as Table3. You get #SPILL! because you are using the formula like this:

=SUMIF(Table3[Category],[Categories],Table3[Amount])

You forgot to include @ that means the category value of a given row. Using [Categories] will generate an array and it is not supported for Excel Tables so you get #SPILL!. Check the following information:

  1. Using structured references with Excel tables.
  2. #SPILL! error - Table formula
  • Related