sumifs using indirect

colinheslop1984

Board Regular
Joined
Oct 14, 2016
Messages
129
Office Version
  1. 2016
Hello

I need to add a second condition in to this formula, the additional criteria is in cell G3. Where/how would I add this in?

=SUMIF(INDIRECT("'"&$C$3&"'!d:d"),A:A,INDIRECT("'"&$C$3&"'!h:h"))
 
"weekly sales!G3" just appeared as I was flicking back and forth between work sheets to select ranges.

This is what I have which works

=SUMIFS('2019'!H2:H365,'2019'!C2:C365,"="&G3,'2019'!D2:D365,"="&A:A)

I just need to adapt it to include the indirect function now

C:C DOES contain G3 and on the same row in D:D I do have A11

The data source (2019) is like this:

A B C D E F G H
QTR MTH WK DAY DATE SALES
1 JUNE 1 SUN 03/06/18 3000
1 JUNE 1 MON 04/06/18 2000

ETC

That didnt come out as well as I thought it would!

A /// B /// C /// D /// E /// F /// G /// H
QTR MTH WK DAY DATE SALES
1 JUNE 1 SUN 03/06/18 3000
1 JUNE 1 MON 04/06/18 2000
 
Upvote 0

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
still dont understand how a criteria can be a range "="&A:A
you dont need the =
So
'2019'!D2:D365,"="&A:A
Should be
'2019'!D2:D365,'Weekly Sales'!A11

shouldn't it?
 
Last edited:
Upvote 0
Whether I use A:A or A11, I still get a result which is accurate.

But how come as soon as I apply the indirect function, in exactly the same formula (as far as I can tell), my result returns a zero, when it should be 40
 
Upvote 0
OK, But i A:A should not work, or its picking up the first values in the rows 1/2

=SUMIFS('2019'!H:H,'2019'!C:C,"'Weekly Sales'!G3",'2019'!D:D,"'Weekly Sales'!A11")
This works
and you want to refer to the sheet for H:H , C:C & D:D
using a cell reference in same sheet as formula is in G3

=SUMIFS(INDIRECT("'"&$C$3&"'!H:H"),INDIRECT("'"&$C$3&"'!C:C"),$G$3,INDIRECT("'"&$C$3&"'!D:D"),A11)

SO in column H you have the items to addup
criteria range is C, criteria in G3
criteria range is D, criteria in A11

so in my example on
in F9
I have
=SUMIFS(INDIRECT("'"&$C$3&"'!H:H"),INDIRECT("'"&$C$3&"'!C:C"),$G$3,INDIRECT("'"&$C$3&"'!D:D"),A11)
and change cell C3 to
2019
OR
2018 C

try the link
https://www.dropbox.com/s/ed7fmurph11tnsp/Indirect_etaf.xlsx?dl=0
 
Upvote 0

Forum statistics

Threads
1,223,238
Messages
6,170,939
Members
452,368
Latest member
jayp2104

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