Indirect with sheetname and formula

glerwell

Well-known Member
Joined
Jun 25, 2006
Messages
1,082
Hi

Is there a way that I can get this formula:

Code:
=SUMPRODUCT(--(TEXT(INDEX(B:B,12):INDEX(B:B,$AO$21),"ddmmmYY")=TEXT(AE14,"ddmmmYY")))

to use the sheetname in L6 as the sheet to where the formula looksup the data. Maybe by using INDIRECT.

I've tried:

Code:
=INDIRECT("'"&$L$6&SUMPRODUCT(--(TEXT(INDEX(B:B,12):INDEX(B:B,$AO$21),"ddmmmYY")=TEXT(AE13,"ddmmmYY"))))

but I'm getting an error.

Any ideas?

Cheers
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
The sheet is open.

I just noticed a mistake with my formula and what I want to achieve:

What I want is this:

=SUMPRODUCT(--((TEXT(INDEX("sheetname in L6" B:B,12):INDEX("sheetname in L6" B:B,$L$15),"ddmmmYY")=TEXT(B10,"ddmmmYY"))))

So basically, I want the INDEX part of the formula(range B:B,12 and B:B,$L$15) to set as the sheetname in L6.

Is this possible?

Thanks
 
Upvote 0
without your data I'm not able to help, but the formula will look something like this

Code:
=SUMPRODUCT(--((TEXT(INDEX(INDIRECT(L6&"!B:B"),12):INDEX((INDIRECT(L6&"!B:B"),$L$15,"ddmmmYY")=TEXT(B10,"ddmmmYY"))))))
 
Upvote 0
Hi, I've tried that and also something along the same lines but I keep on getting "the formula you typed contains an error" message. :confused:
 
Upvote 0
There's too much data to post a sample, due to the data being spread over numerous sheets.

The formula works if I directly use a sheet reference ie.

=SUMPRODUCT(--((TEXT(INDEX('BANKER'!B:B,12):INDEX(' BANKER'!B:B,$L$15),"ddmmmYY")=TEXT(B10,"ddmmmYY"))))

but not indirectly.

I'll keep trying, it must be achievable!

thanks
 
Upvote 0
Hi

Is there a way that I can get this formula:

Code:
=SUMPRODUCT(--(TEXT(INDEX(B:B,12):INDEX(B:B,$AO$21),"ddmmmYY")=TEXT(AE14,"ddmmmYY")))

to use the sheetname in L6 as the sheet to where the formula looksup the data. Maybe by using INDIRECT.

I've tried:

Code:
=INDIRECT("'"&$L$6&SUMPRODUCT(--(TEXT(INDEX(B:B,12):INDEX(B:B,$AO$21),"ddmmmYY")=TEXT(AE13,"ddmmmYY"))))

but I'm getting an error.

Any ideas?

Cheers

Does this...

=SUMPRODUCT(--(TEXT(INDEX(INDIRECT("'"&L6&"'!B:B"),12):INDEX(INDIRECT("'"&L6&"'!B:B"),$AO$21),"ddmmmYY")=TEXT(AE14,"ddmmmYY")))

work?
 
Upvote 0

Forum statistics

Threads
1,224,584
Messages
6,179,691
Members
452,938
Latest member
babeneker

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