# SUMIF meets criteria in another column and divide by particular amounts

##### New Member
Hello

I hope you can help me, quite the beginner in excel. I am trying to sum the numbers in one column, if they meet a text criteria in another. For example, if the cell says Amy in a given range and says "ALL, AA or EACH" then I want to add the numbers in the column. I want to /4 if = ALL, /2 if =AA or just add the amounts that say EACH. So there may be 4 ALLs, 3 AAs and 1 EACH. Every ALL should be /4 then added, every AA should be /2 then added and EACH should be added without dividing.

Thank you very much

### Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Please post some sample data and the expected results.

Is this what you are after,
=IF(C2="ALL",(SUM(D3:D8)/4),IF(C2="AA",(SUM(D3:D8)/2),IF(C2="EACH",(SUM(D3:D8)),)))

Where C2 is the variable of ALL, AA and EACH and D3:D8 is the range to be added. Change as applicable.

Thank you Simon, not sure if that's quite working for me. Here is some sample data so you can see what I mean....

Cost Split
10 ALL
20 ALL
30 AA
40 AB
10 ALL
20 AB
30 EACH
40 ALL
10 AA
20 EACH

Key
ALL=split between everyone
AA=split between Amy and Brian
AB= split between Carla and David
EACH = add amount to each person

Total amount owed each Name: Amy, Brian, Carla, David

Sorry couldn't format that terribly well. Would welcome you input.

Replies
2
Views
251
Replies
1
Views
458
Replies
6
Views
275
Replies
1
Views
347
Replies
1
Views
310

1,196,188
Messages
6,013,927
Members
441,796
Latest member
kmag

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back