Share via

EXCEL FUNCTION

Anonymous
2024-12-30T11:52:39+00:00

Hello. I would like to ask what function we use to add cells that have something in common between them. for example what function will we use to find the sum for the tomato cells in the example below A B 1 tomato 43 2 apple 25 3 tomato 67 4 orange 33 5 tomato 81

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. Anonymous
    2024-12-30T23:50:14+00:00

    Hi,

    sql:

    select * from Sheet1;

    select f01,sum(f02) from Sheet1 group by f01;

    0 comments No comments
  2. Ashish Mathur 101.8K Reputation points Volunteer Moderator
    2024-12-30T23:39:59+00:00

    Hi,

    You may create a Pivot Table. Alternatively, you may use the Groupby() function. In cell D1, enter this formula

    =GROUPBY(A1:A6,B1:B6,SUM,3)

    Hope this helps.

    0 comments No comments
  3. riny 20,870 Reputation points Volunteer Moderator
    2024-12-30T12:30:04+00:00

    Use SUMIF as demonstrated below.

    0 comments No comments