Excel Formula - Sum values based on conditions

hrayani

Well-known Member
Joined
Jul 23, 2010
Messages
1,501
Office Version
  1. 2016
Platform
  1. Windows
Hello Friends,

Please have a look at the below sample data and kindly provide a solution for this

TEST FILE.xlsm
ABCD
1SupplierSAMPLING VALUE
2HumayunJAN - 2021 256
3CharlieJAN - 2021 257
4CharlieJAN - 2021 258
5JohnAPR - 2021 987
6PeterAPR - 2021 999
7HumayunJAN - 2021 101
8PeterJAN - 2021 658
9JohnJUL - 2021 1,999
10
11SupplierSAMPLINGVALUE
12HumayunJAN - 2021 872 < Formula Required to sum value based on 2 criteria
13Charlie1) look at column B for sampling
142) look at list in A12:A15 for suppliers
15If list in A12:A15 is empty then sum all clients
Sheet7
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
How about
Excel Formula:
=SUMPRODUCT(SUMIFS(C2:C9,B2:B9,B12,A2:A9,IF(COUNTA(A12:A15)=0,"*",A12:A15)))
 
Upvote 0
Solution
How about
Excel Formula:
=SUMPRODUCT(SUMIFS(C2:C9,B2:B9,B12,A2:A9,IF(COUNTA(A12:A15)=0,"*",A12:A15)))
Thanks Fluff....
Working exactly the way I wanted it to :)
 
Upvote 0
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,923
Messages
6,122,283
Members
449,075
Latest member
staticfluids

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