SumIfs Using Indirect based on 2 Criteria

MINDFULLYLIZ

New Member
Joined
Sep 2, 2020
Messages
6
Office Version
  1. 2016
Platform
  1. Windows
Hi! I have been struggling for 5 days trying to get this formula to work. Basically, I need it to search across a few worksheets which I have named "JON" and sum a corresponding cell if it meets two conditions.

The formula returns a "Value" error:

=SUMIFS(INDIRECT("'"&JON&"'!$F$16:$F$65"),INDIRECT("'"&JON&"'!$A$16:$A$65"),$A5,INDIRECT("'"&JON&"'!A1:A1"),$B5))

Please tell me what I'm doing wrong.

Also note on the second criteria I've changed the "A1:A1" to just A1 and A1:A2 and A1:B2 to see if that helps
 

MINDFULLYLIZ

New Member
Joined
Sep 2, 2020
Messages
6
Office Version
  1. 2016
Platform
  1. Windows
Try it like
Excel Formula:
=SUMPRODUCT((COUNTIF(INDIRECT("'"&JON&"'!A1"),B5))*(SUMIF(INDIRECT("'"&JON&"'!A16:A65"),A5,INDIRECT("'"&JON&"'!F16:F65"))))
OH MY GOSH!!!!! THIS WORKS! Thank you so much!!!!!
 

Some videos you may like

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.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,794
Office Version
  1. 365
Platform
  1. Windows
Glad to help & thanks for the feedback.
 

MINDFULLYLIZ

New Member
Joined
Sep 2, 2020
Messages
6
Office Version
  1. 2016
Platform
  1. Windows
Try it like
Excel Formula:
=SUMPRODUCT((COUNTIF(INDIRECT("'"&JON&"'!A1"),B5))*(SUMIF(INDIRECT("'"&JON&"'!A16:A65"),A5,INDIRECT("'"&JON&"'!F16:F65"))))
Hi!!! Thought I responded earlier! But this worked!!!!! Thank you so much!!!!!!
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,794
Office Version
  1. 365
Platform
  1. Windows
You did :) but it's the first post on page2, so you may have missed it. ;)
But thanks again for the feedback.
 

Watch MrExcel Video

Forum statistics

Threads
1,128,109
Messages
5,628,758
Members
416,337
Latest member
tl3phd

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
Top