redsockspugie

New Member
Joined
Jul 20, 2012
Messages
3
I was wondering whether it is possible to incorporate multiple criteria in a SUMIFS formula.
I have a form control dropdown box with various items in it that have been linked to a list of cells within the spreadsheet. So my dropdown box has, for example: Item 1, Item 2, Item 3, Item 4, All Items. And I have a cell in my spreadsheet which displays which option has been selected.

The formula I am trying to create performs a SUMIF for values (that occur within certain dates) when 'all items' is selected.

This is the sort of thing I am trying to do:
=SUMIFS(PTS!T:T,PTS!B:B,">="&DATE(('Dropdown options'!I6), 1, 1),PTS!B:B,"<="&DATE(('Dropdown options'!I6), 2, 29),PTS!F:F, {item 1, item 2, item 3, etc.})

Ideally, what I would like to do is have this list in another cell and have it referenced in this.
e.g.
=SUMIFS(PTS!T:T,PTS!B:B,">="&DATE(('Dropdown options'!I6), 1, 1),PTS!B:B,"<="&DATE(('Dropdown options'!I6), 2, 29),PTS!F:F, 'Dropdown options'!J4)

where 'Dropdown options'!J4 contained the list of items.

I have also tried using the OR function for the criteria list, but to no avail.
Is this at all possible? Any responses would be very much appreciated. Thanks in advance!
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Try using

=SUMPRODUCT((PTS!B:B>=DATE('Dropdown options'!I6,1,1))*(PTS!B:B<=DATE('Dropdown options'!I6,2,29))*(PTS!F:F={"item 1","item 2","item 3"})*(PTS!T:T))
 
Upvote 0
You could also use

=SUM(SUMIFS(PTS!T:T,PTS!B:B,">="&DATE('Dropdown options'!I6,1,1),PTS!B:B,"<="&DATE('Dropdown options'!I6,2,29),PTS!F:F,{"item 1","item 2","item 3"}))
 
Upvote 0
I was wondering whether it is possible to incorporate multiple criteria in a SUMIFS formula.
I have a form control dropdown box with various items in it that have been linked to a list of cells within the spreadsheet. So my dropdown box has, for example: Item 1, Item 2, Item 3, Item 4, All Items. And I have a cell in my spreadsheet which displays which option has been selected.

The formula I am trying to create performs a SUMIF for values (that occur within certain dates) when 'all items' is selected.

This is the sort of thing I am trying to do:
=SUMIFS(PTS!T:T,PTS!B:B,">="&DATE(('Dropdown options'!I6), 1, 1),PTS!B:B,"<="&DATE(('Dropdown options'!I6), 2, 29),PTS!F:F, {item 1, item 2, item 3, etc.})

Ideally, what I would like to do is have this list in another cell and have it referenced in this.
e.g.
=SUMIFS(PTS!T:T,PTS!B:B,">="&DATE(('Dropdown options'!I6), 1, 1),PTS!B:B,"<="&DATE(('Dropdown options'!I6), 2, 29),PTS!F:F, 'Dropdown options'!J4)

where 'Dropdown options'!J4 contained the list of items.

I have also tried using the OR function for the criteria list, but to no avail.
Is this at all possible? Any responses would be very much appreciated. Thanks in advance!

1.
Rich (BB code):
=SUM(
  SUMIFS(
   PTS!T:T,
   PTS!B:B,">="&DATE('Dropdown options'!I6, 1, 1),
   PTS!B:B,"<="&DATE('Dropdown options'!I6, 2, 29),
   PTS!F:F, {"item 1", "item 2", "item 3, "}))

2. If the items are in a range, say, in X1:X3...
a)
Rich (BB code):
=SUMPRODUCT(
  SUMIFS(
   PTS!T:T,
   PTS!B:B,">="&DATE('Dropdown options'!I6, 1, 1),
   PTS!B:B,"<="&DATE('Dropdown options'!I6, 2, 29),
   PTS!F:F, X1:X2))
b)
Rich (BB code):
=SUMPRODUCT(
   PTS!T:T,
   --(PTS!B:B>=DATE('Dropdown options'!I6, 1, 1)),
     --(PTS!B:B<=DATE('Dropdown options'!I6, 2, 29)),
   --ISNUMBER(MATCH(PTS!F:F, X1:X2,0)))
 
Upvote 0
Create a Named Range with the Item you need and call them list
(let say a1:a3, item1,item2,item3)
then use
=SUMPRODUCT(SUMIFS(pts!T:T,pts!B:B,">="&DATE(('Dropdown options'!I6), 1, 1),pts!B:B,"<="&DATE(('Dropdown options'!I6), 2, 29),pts!F:F,INDIRECT('Dropdown options'!J4)))
 
Upvote 0
Thank you for all of your quick replies.

You could also use

=SUM(SUMIFS(PTS!T:T,PTS!B:B,">="&DATE('Dropdown options'!I6,1,1),PTS!B:B,"<="&DATE('Dropdown options'!I6,2,29),PTS!F:F,{"item 1","item 2","item 3"}))

1.
Rich (BB code):
=SUM(
  SUMIFS(
   PTS!T:T,
   PTS!B:B,">="&DATE('Dropdown options'!I6, 1, 1),
   PTS!B:B,"<="&DATE('Dropdown options'!I6, 2, 29),
   PTS!F:F, {"item 1", "item 2", "item 3, "}))

This is the solution I have used so far and it has worked nicely.
Now I would like to have that list in another cell (e.g. 'Dropdown options'!J4) and have it referenced like
=SUM(SUMIFS(PTS!T:T,PTS!B:B,">="&DATE(('Dropdown options'!I6), 1, 1),PTS!B:B,"<="&DATE(('Dropdown options'!I6), 2, 29),PTS!F:F, 'Dropdown options'!J4))
However, just putting {"item 1", "item 2", "item 3, "} into the reference cell is not working.

Create a Named Range with the Item you need and call them list
(let say a1:a3, item1,item2,item3)
then use
=SUMPRODUCT(SUMIFS(pts!T:T,pts!B:B,">="&DATE(('Dropdown options'!I6), 1, 1),pts!B:B,"<="&DATE(('Dropdown options'!I6), 2, 29),pts!F:F,INDIRECT('Dropdown options'!J4)))

Robert Mika, if 'Dropdown options'!J4 ends up representing the list/named range in that one cell, then I think this may be what I am after. However, I am not too familiar with the INDIRECT function and struggling to see how it's been linked to the named range. Would really appreciate if you could explain this please.

Thanks again for all your help!
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,751
Members
448,989
Latest member
mariah3

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