Nested Sumif/Indirect/Vlookup

gmittar

Board Regular
Joined
Sep 16, 2013
Messages
62
Hi guys,

I have a sumif formula that I'm trying to link to dynamic tab names based on a drop down. I'm fairly new to indirects, but got the function to work with explicit sheet names. However, when I throw in a vlookup to build a dynamic sheet name it breaks. Any help is appreciated.

Here's the formula that isn't working, it returns #Ref ! The Vlookup is looking for the first part of the sheet name, and the second part is constant. I've removed the latter part of the formula as it hasn't changed from the working version.

=SUMIFS(INDIRECT("'"&VLOOKUP($B$1,$S$3:$T$13,2,FALSE)&" Second Part of Sheet Name'"&"!"&"$C$98&:$&NC$98")

<colgroup><col></colgroup><tbody>
</tbody>
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
hi,

i don't have excel available now, but first of all, these ampersands look extra in your formula

=SUMIFS(INDIRECT("'"&VLOOKUP($B$1,$S$3:$T$13,2,FALSE)&" Second Part of Sheet Name'"&"!"&"$C$98&:$&NC$98")




 
Upvote 0
Thanks guys, I got it working. My issue was that I had way too many quotation marks in my formula. When I removed all but the ones at the beginning of the named portion and the end of the range, it worked.
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,853
Members
449,051
Latest member
excelquestion515

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