Nesting 2 SUMIF formulas in SUBTOTAL

LuckyJrEskie

New Member
Joined
Dec 7, 2016
Messages
1
Hi,

I have searched through Mr. Excel and Google, and have reached an impasse. My original formula to add certain values in a list was:


=SUMIF([Total Due], "110") + SUMIF([Total Due], "140")

However, I need this to work as a SUBTOTAL function. I have tried several variations of the below formula with success:

[FONT=&quot]=SUMPRODUCT(SUBTOTAL(109,OFFSET(G11,ROW([Total Due])-ROW(G11),,1)),--([Total Due] = "140"+"110"))


I'd appreciate any suggestions in merging these two separate functions, if possible!


[/FONT]
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Hi
Welcome to the board

For ex.:

=SUMPRODUCT(SUBTOTAL(109,OFFSET(Table1[TotalDue],ROW(Table1[TotalDue])-MIN(ROW(Table1[TotalDue])),)),--ISNUMBER(MATCH(Table1[TotalDue],{110,140},0)))

Another option:

=SUMPRODUCT(SUBTOTAL(109,OFFSET(Table1[TotalDue],ROW(Table1[TotalDue])-MIN(ROW(Table1[TotalDue])),))*(Table1[TotalDue]={110,140}))

Remark:

You used "110" which is a string. I guessed that you mean the number 110.

Next time please post a working example, with a small table, the result you got and the result you need.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,260
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