SUMIF meets criteria in another column and divide by particular amounts

adidasfreek

New Member
Joined
Sep 8, 2007
Messages
22
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.

Would be grateful for your expert advice.

Thank you very much
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
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.
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,497
Members
448,967
Latest member
visheshkotha

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top