SUMIFS multiple criteria cannot reference to a cell?

danhendo888

Board Regular
Joined
Jul 15, 2019
Messages
142
Office Version
  1. 365
Platform
  1. Windows
https://1drv.ms/x/s!AvjBsEPEq12ngTWjooUrD2AsRCFa?e=BpSibC

I am trying to do a SUMIFS formula calculating the sales column if the country equals australia, india and china (actual data has more countries)

=sum(sumifs(B2:B4,{

If I try to click on the cell to reference it, Excel doesn't let us.

I can just type out the country names but wondering if there's another way.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Are you looking for something like this:


Book1
ABCD
1CountrySales
2Australia100
3India50Sum of Australia,India,China
4China300450
5Pakistan200
6England150
7Germany690
8
Sheet1
Cell Formulas
RangeFormula
D4=SUM(SUMIF(A2:A7,{"Australia";"India";"China"},B2:B7))
 
Upvote 0
If you dont want to type the name of the country then you can concatenate it using "&". Here is an example of it:


Book1
ABCD
1CountrySales
2Australia100
3Pakistan200Sum of Australia,India,China
4India50450
5England150
6Germany690
7China300
Sheet1
Cell Formulas
RangeFormula
D4{=SUM(ISNUMBER(SEARCH(A2:A7,A2&A4&A7))*B2:B7)}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Like i said in post number 2 he just doesnt need the {. He can then reference some cells with the countries required in. eg:

=SUMPRODUCT(SUMIFS(B:B,A:A,A2:A4))

where A2:A4 contains the countries to sum. These dont have to be within the criteria range but can be if required.
 
Upvote 0

Forum statistics

Threads
1,214,385
Messages
6,119,208
Members
448,874
Latest member
b1step2far

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