SUMIFS AND INDIRECT

rikvny02

Board Regular
Joined
Aug 9, 2022
Messages
78
Office Version
  1. 365
Platform
  1. Windows
I’m struggling with a formula. It works completely fine when I use if on the same sheet however, when I try to expand the formula over another sheet it fails. Basically what I am trying to accomplish is, SUMIF the run in column Z has a pay code in Column H to return the sum from the window sheet. I have tried using SUMIFs with INDIRECT but I’m drawing dead. If you have any free time can you help?

DATA.png
WS.png


Thanks
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
whats the formula that works on 1 sheet
sorry, but i'm not following exactly
why use an indirect()

what columns are you trying to SUM and what criteria

column Z has 1234 in cell Z2
on the other sheet
column H is hidden
or on the first image you have windows sheet master in H

what are you summing, based on what criteria ???

as i say really sorry i'm not following , other members may understand

Note: Images are difficult to see , and also requires that I input all the data myself, which is very time consuming.

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC , then put the sample spreadsheet onto a share
I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed
 
Upvote 0
whats the formula that works on 1 sheet
sorry, but i'm not following exactly
why use an indirect()

what columns are you trying to SUM and what criteria

column Z has 1234 in cell Z2
on the other sheet
column H is hidden
or on the first image you have windows sheet master in H

what are you summing, based on what criteria ???

as i say really sorry i'm not following , other members may understand

Note: Images are difficult to see , and also requires that I input all the data myself, which is very time consuming.

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC , then put the sample spreadsheet onto a share
I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed
 
Upvote 0
I’m struggling with a formula. It works completely fine when I use if on the same sheet however, when I try to expand the formula over another sheet it fails. Basically what I am trying to accomplish is, SUMIF the run in column Z has a pay code in Column H to return the sum from the window sheet. I have tried using SUMIFs with INDIRECT but I’m drawing dead. If you have any free time can you help?

View attachment 75090View attachment 75091

Thanks

whats the formula that works on 1 sheet
sorry, but i'm not following exactly
why use an indirect()

what columns are you trying to SUM and what criteria

column Z has 1234 in cell Z2
on the other sheet
column H is hidden
or on the first image you have windows sheet master in H

what are you summing, based on what criteria ???

as i say really sorry i'm not following , other members may understand

Note: Images are difficult to see , and also requires that I input all the data myself, which is very time consuming.

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC , then put the sample spreadsheet onto a share
I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed
SUM IFS TEST.xlsm
ABCDEFGHXYZAA
1Cuts-82.40ADDS49.90Rrunsadds
2StationPCHOURSRUNRUNwindow sheet masterCuts-23.93215=SUMIFS(INDIRECT(
3B17.9160916091Adds03211
4B207.860760701s1234
5B199.260732151s
6B01s7.7607321119
7b18.4607123420
8B238.616090
9F18.9607
10R18.53215
11R17.23211
12R18.21234
Platform Hours
Cell Formulas
RangeFormula
B1B1=SUM(C:C)*-1
G1G1=SUM(J3+O3+T3+Y3)
Y2Y2=SUMIF($A:$A,"R",$C:$C)*-1
Y3Y3=SUM(AA2:AA38)
Z2:Z4Z2=_xlfn.UNIQUE(_xlfn._xlws.FILTER(D3:D20,A3:A20=X1))
F2F2=D2
F3:F8F3=_xlfn.UNIQUE(D3:D40)
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
SUM IFS TEST.xlsm
ABCDEGIJKLM
1DateStationEmployee IdEmployee NamePay CodeAtt CodePaid HoursCut AltBorrowed AcctRun
209/25/2022R7290018.50cut3215
219/25/2022R7347017.20cut3211
239/25/2022R7211018.20cut1234
249/25/2022R726701s4.001234
1979/25/2022R5268027.703215
1989/25/2022R5596998.6014507
1999/25/2022R5474167.701234
2009/25/2022R5351278.1014511
2019/25/2022R553601s8.103211
2029/25/2022R5523197.703211
2039/25/2022R5174207.703211
2049/25/2022R5420017.7014517
2059/25/2022R5525017.7014518
Window Sheet Master
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E2:E9999Expression=AND($E2 <> 1, $E2 <> "")textYES
L2:L9999Expression=($L2 <> "")textNO
C2:D9999,I2:I9999Expression=OR(AND($E2 <> 1, $C2 <> ""), ($G2 <> ""), ($J2 = "Cut"), ($K2 = "Alt"))textNO
 
Upvote 0
thanks for providing the sheets in XL2BB
sorry, but i still dont know just from the sheets what you are after

SUMIF the run in column Z has a pay code in Column H to return the sum from the window sheet.

in platform hours sheet - column Z you have run
in platform hours sheet - column H you have window sheet master

as asked
what columns are you trying to SUM and what criteria

still not following just by looking at the sheets

Windows sheet master - column E has a paycode and M has the RUN
but thats not helping as i still have no idea what you are wanting to sum and using what criteria and why you think you need indirect()
 
Upvote 0
thanks for providing the sheets in XL2BB
sorry, but i still dont know just from the sheets what you are after



in platform hours sheet - column Z you have run
in platform hours sheet - column H you have window sheet master

as asked


still not following just by looking at the sheets

Windows sheet master - column E has a paycode and M has the RUN
but thats not helping as i still have no idea what you are wanting to sum and using what criteria and why you think you need indirect()
Thanks so very much for your patients. Let me try to explain a bit better. I need the sum of the RUN in column Z (platform hours) but only if the run has pay codes of (01, 01s, 1s, 19,20). True values of the runs can be found on the Window Sheet Master (RUN in column M, Pay code in column E, and Hours in Column I). Again I cant thank you enough for being so patient.

Rikki
 
Upvote 0
I need the sum of the RUN in column Z (platform hours) but only if the run has pay codes of (01, 01s, 1s, 19,20). True values of the runs can be found on the Window Sheet Master (RUN in column M, Pay code in column E, and Hours in Column I).

we are summing 2 criteria
PH - Column Z RUN code - Matches with WSM - Column M
so thats the numbers -
3215
3211
1234
AND also has the codes from PH - column H - H3:H7 - Match with the WMS column E
which is this list
1
01s
1s
19
20
But that does not match your Green Highlight

and then the column to sum is WSM - column I

result in PH - column AA2


then
=SUMPRODUCT(SUMIFS('Window Sheet Master'!I:I,'Window Sheet Master'!E:E,'Platform Hours'!$H$3:$H$7,'Window Sheet Master'!M:M,'Platform Hours'!Z2))



should work
I have checked and i'm getting correct result

i have put on a share - will only be in for a few days - simply because you seem to have values in lots of rows/columns with many hidden and was getting a bit lost



Forum Q - ETAF.xlsx
ABCDEFGHXYZAAAB
1Cuts-82.4ADDS51.4Rrunsadds
2StationPCHOURSRUNRUNwindow sheet masterCuts-23.932158.5correct
3B17.9160916091Adds51.4321130.7correct
4B207.860760701s123412.2correct
5B199.260732151s
6B01s7.7607321119
7b18.4607123420
8B238.616090
9F18.9607
10R18.53215
11R17.23211
12R18.21234
Platform Hours
Cell Formulas
RangeFormula
B1B1=SUM(C:C)*-1
G1G1=SUM(J3+O3+T3+Y3)
Z2:Z4Z2=UNIQUE(FILTER(D3:D20,A3:A20=X1))
F2F2=D2
F3:F8F3=UNIQUE(D3:D40)
Y2Y2=SUMIF($A:$A,"R",$C:$C)*-1
Y3Y3=SUM(AA2:AA38)
AA2:AA4AA2=SUMPRODUCT(SUMIFS('Window Sheet Master'!I:I,'Window Sheet Master'!E:E,'Platform Hours'!$H$3:$H$7,'Window Sheet Master'!M:M,'Platform Hours'!Z2))
Dynamic array formulas.



column N , O, P - i have put the values manually where i think the conditions for runcode and for the list match and checked
Forum Q - ETAF.xlsx
ABCDEFGHXYZAAAB
1Cuts-82.4ADDS51.4Rrunsadds
2StationPCHOURSRUNRUNwindow sheet masterCuts-23.932158.5correct
3B17.9160916091Adds51.4321130.7correct
4B207.860760701s123412.2correct
5B199.260732151s
6B01s7.7607321119
7b18.4607123420
8B238.616090
9F18.9607
10R18.53215
11R17.23211
12R18.21234
Platform Hours
Cell Formulas
RangeFormula
B1B1=SUM(C:C)*-1
G1G1=SUM(J3+O3+T3+Y3)
Z2:Z4Z2=UNIQUE(FILTER(D3:D20,A3:A20=X1))
F2F2=D2
F3:F8F3=UNIQUE(D3:D40)
Y2Y2=SUMIF($A:$A,"R",$C:$C)*-1
Y3Y3=SUM(AA2:AA38)
AA2:AA4AA2=SUMPRODUCT(SUMIFS('Window Sheet Master'!I:I,'Window Sheet Master'!E:E,'Platform Hours'!$H$3:$H$7,'Window Sheet Master'!M:M,'Platform Hours'!Z2))
Dynamic array formulas.
 
Upvote 0
Solution
we are summing 2 criteria
PH - Column Z RUN code - Matches with WSM - Column M
so thats the numbers -
3215
3211
1234
AND also has the codes from PH - column H - H3:H7 - Match with the WMS column E
which is this list
1
01s
1s
19
20
But that does not match your Green Highlight

and then the column to sum is WSM - column I

result in PH - column AA2


then
=SUMPRODUCT(SUMIFS('Window Sheet Master'!I:I,'Window Sheet Master'!E:E,'Platform Hours'!$H$3:$H$7,'Window Sheet Master'!M:M,'Platform Hours'!Z2))



should work
I have checked and i'm getting correct result

i have put on a share - will only be in for a few days - simply because you seem to have values in lots of rows/columns with many hidden and was getting a bit lost



Forum Q - ETAF.xlsx
ABCDEFGHXYZAAAB
1Cuts-82.4ADDS51.4Rrunsadds
2StationPCHOURSRUNRUNwindow sheet masterCuts-23.932158.5correct
3B17.9160916091Adds51.4321130.7correct
4B207.860760701s123412.2correct
5B199.260732151s
6B01s7.7607321119
7b18.4607123420
8B238.616090
9F18.9607
10R18.53215
11R17.23211
12R18.21234
Platform Hours
Cell Formulas
RangeFormula
B1B1=SUM(C:C)*-1
G1G1=SUM(J3+O3+T3+Y3)
Z2:Z4Z2=UNIQUE(FILTER(D3:D20,A3:A20=X1))
F2F2=D2
F3:F8F3=UNIQUE(D3:D40)
Y2Y2=SUMIF($A:$A,"R",$C:$C)*-1
Y3Y3=SUM(AA2:AA38)
AA2:AA4AA2=SUMPRODUCT(SUMIFS('Window Sheet Master'!I:I,'Window Sheet Master'!E:E,'Platform Hours'!$H$3:$H$7,'Window Sheet Master'!M:M,'Platform Hours'!Z2))
Dynamic array formulas.



column N , O, P - i have put the values manually where i think the conditions for runcode and for the list match and checked
Forum Q - ETAF.xlsx
ABCDEFGHXYZAAAB
1Cuts-82.4ADDS51.4Rrunsadds
2StationPCHOURSRUNRUNwindow sheet masterCuts-23.932158.5correct
3B17.9160916091Adds51.4321130.7correct
4B207.860760701s123412.2correct
5B199.260732151s
6B01s7.7607321119
7b18.4607123420
8B238.616090
9F18.9607
10R18.53215
11R17.23211
12R18.21234
Platform Hours
Cell Formulas
RangeFormula
B1B1=SUM(C:C)*-1
G1G1=SUM(J3+O3+T3+Y3)
Z2:Z4Z2=UNIQUE(FILTER(D3:D20,A3:A20=X1))
F2F2=D2
F3:F8F3=UNIQUE(D3:D40)
Y2Y2=SUMIF($A:$A,"R",$C:$C)*-1
Y3Y3=SUM(AA2:AA38)
AA2:AA4AA2=SUMPRODUCT(SUMIFS('Window Sheet Master'!I:I,'Window Sheet Master'!E:E,'Platform Hours'!$H$3:$H$7,'Window Sheet Master'!M:M,'Platform Hours'!Z2))
Dynamic array formulas.
Thank you so much
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,738
Members
448,988
Latest member
BB_Unlv

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