# Nesting 2 SUMIF formulas in SUBTOTAL

#### LuckyJrEskie

##### New Member
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

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

#### pgc01

##### MrExcel MVP
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:

Replies
2
Views
191
Replies
1
Views
182
Replies
1
Views
326
Replies
1
Views
191
Replies
6
Views
145

1,195,848
Messages
6,011,951
Members
441,657
Latest member
Diupsy

### 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?

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