Sumproduct SumIF Indirect functions across multiple tabs

KRE

New Member
Joined
Apr 18, 2023
Messages
17
Office Version
  1. 365
Platform
  1. Windows
I have 12 tabs for each month of the year. I'm trying to return a name that is listed in a cell tied to a date range on my summary page. See below. I know that the reason this formula isn't working is because a name isn't a value but i'm not sure what formula would work?

1681852701510.png


Each tab is similar as below.
1681852755032.png


My formula should return Esteban Mendoz in column K of my summary because it matches to the week number.
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
I think this ugly formula might work (needs the rest of the month abbrv and the range on column I) with a bit more info about the layout, there's likely a much neater VBA formula.

Code:
=INDIRECT("'"&CHOOSE(MONTH(C2),"Jan","Feb","Mar")&"'!O"&MATCH(1,--(A2=INDIRECT("'"&CHOOSE(MONTH(C2),"Jan","Feb","Mar")&"'!I1:I10")),0))

I'm not a big fan of INDIRECT as a volatile function.
 
Upvote 1
Hi & welcome to MrExcel.
How about
Excel Formula:
=LET(h,HSTACK(Jan:Dec!I2:O1000),FILTER(TAKE(h,,-1),INDEX(h,,1)=A2))
 
Upvote 0
I think this ugly formula might work (needs the rest of the month abbrv and the range on column I) with a bit more info about the layout, there's likely a much neater VBA formula.

Code:
=INDIRECT("'"&CHOOSE(MONTH(C2),"Jan","Feb","Mar")&"'!O"&MATCH(1,--(A2=INDIRECT("'"&CHOOSE(MONTH(C2),"Jan","Feb","Mar")&"'!I1:I10")),0))

I'm not a big fan of INDIRECT as a volatile function.
This didn't work unfortunately or I didn't type it right. What I'm basically trying to do is Look in my summary tab for cell A1 which is "1" and also cell K1 which is "Foreman 1" and find throughout all my month tabs labeled Jan, Feb, etc in the range I2:O7 of each and match the "1" and match "foreman 1" and return Esteban Melendez in my summary sheet.

The formula i tried to replicate from you is listed below...

=INDIRECT(" ' "&CHOOSE(MONTH(A2),"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")&"'!O"&MATCH(1,--(A2=INDIRECT(" ' "&CHOOSE(MONTH(A2),"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")&"'!I3:I7")),0))

1681909677200.png


1681909725090.png
 
Upvote 0
Hi & welcome to MrExcel.
How about
Excel Formula:
=LET(h,HSTACK(Jan:Dec!I2:O1000),FILTER(TAKE(h,,-1),INDEX(h,,1)=A2))
I didn't get this formula to work either
=LET(h,HSTACK(Jan:Dec!I2:O7),FILTER(TAKE(h, ,-1),INDEX(h, ,1)=A3))

I shortened my range to I2:O7 because that's all the bigger the range needed to be. I felt like I typed everything else the same.

1681910231172.png
 
Upvote 0
Oops, it should be VSTACK
Excel Formula:
=LET(h,VSTACK(Jan:Dec!I2:O7),FILTER(TAKE(h,,-1),INDEX(h,,1)=A2))
 
  • Like
Reactions: KRE
Upvote 1
Oops, it should be VSTACK
Excel Formula:
=LET(h,VSTACK(Jan:Dec!I2:O7),FILTER(TAKE(h,,-1),INDEX(h,,1)=A2))
That worked Fluff! Thank you. I copied it across to my other foreman name columns and got it to work by changing my range from O7 to P7 and from P7 to Q7. But when I copied it down referencing A3 instead of A2 and A4 instead of A3 etc I was getting a spill error. If I deleted the row below it then my next row would pop up "Kailey". But I wondered why I got the spill error. Is it because of the "h" in the formula or is it the "-1" and the "1" in the formula

1681911176117.png


1681911203081.png
 
Upvote 0
Did you lock the range like
Excel Formula:
=LET(h,VSTACK(Jan:Dec!I$2:O$7),FILTER(TAKE(h,,-1),INDEX(h,,1)=A2))
 
Upvote 0
Solution
sure did. It's like it's referencing the cell above and below it. and some come back with #calc!. not all the formulas show the spill either. it's quite random


1681913803718.png
 
Upvote 0
I got the Calc errors to go away but not the spill errors and it's only on the first 12 rows
 
Upvote 0

Forum statistics

Threads
1,215,339
Messages
6,124,381
Members
449,155
Latest member
ravioli44

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