Concatanation formula within a formula ... any ideas please?

JohnDouglas

Board Regular
Joined
Jan 5, 2005
Messages
239
I have the following formula where A4 is the name of the sheet to be referenced:

=INDEX(INDIRECT("'"&$A4&"'!$D$2:$AJ$101"),MATCH(CONCATENATE($B$1,B$3),INDIRECT("'"&$A4&"'!$A$2:$A$101"),0),MATCH($E$1,INDIRECT("'"&$A4&"'!$D$1:$AJ$1"),0))

the $A$2:$A$101 part references a column in another sheet which is the result of concatenating columns B2:B101 & C2:C101 is placed.

If possible i'd love to get rid of the column that does that concatenation and instead get my forumla pasted above to do the concatenation automatically. Whenever i try i get an error. Can anyone help me out and give me the correct way of getting this forumla to concatenate mid flow?!


I tried:

=INDEX(INDIRECT("'"&$A4&"'!$D$2:$AJ$101"),MATCH(CONCATENATE($B$1,B$3),INDIRECT("'"&$A4&"'!(concatenate($B$2:$B$101,$C$2:$C$101))"),0),MATCH($E$1,INDIRECT("'"&$A4&"'!$D$1:$AJ$1"),0))

but sadly no dice!
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Re: Concatanation formula within a formula ... any ideas ple

JohnDouglas said:
I have the following formula where A4 is the name of the sheet to be referenced:

=INDEX(INDIRECT("'"&$A4&"'!$D$2:$AJ$101"),MATCH(CONCATENATE($B$1,B$3),INDIRECT("'"&$A4&"'!$A$2:$A$101"),0),MATCH($E$1,INDIRECT("'"&$A4&"'!$D$1:$AJ$1"),0))

the $A$2:$A$101 part references a column in another sheet which is the result of concatenating columns B2:B101 & C2:C101 is placed.

If possible i'd love to get rid of the column that does that concatenation and instead get my forumla pasted above to do the concatenation automatically. Whenever i try i get an error. Can anyone help me out and give me the correct way of getting this forumla to concatenate mid flow?!


I tried:

=INDEX(INDIRECT("'"&$A4&"'!$D$2:$AJ$101"),MATCH(CONCATENATE($B$1,B$3),INDIRECT("'"&$A4&"'!(concatenate($B$2:$B$101,$C$2:$C$101))"),0),MATCH($E$1,INDIRECT("'"&$A4&"'!$D$1:$AJ$1"),0))

but sadly no dice!

That would produce an array object that INDIRECT cannot process.
 
Upvote 0
JohnDouglas said:
so there is no way that i can do this then?

You already have a fairly expensive formula, one that is prone to degrade the performance. The following is bound to worsen it....

=INDEX(INDIRECT("'"&$A4&"'!$D$2:$AJ$101"),MATCH($B$1&","&B$3),INDIRECT("'"&$A4&"'!B2:B101")&","&INDIRECT("'"&$A4&"'!C2:C101"),0),MATCH($E$1,INDIRECT("'"&$A4&"'!$D$1:$AJ$1"),0))

which you must confirm with control+shift+enter instead of just with enter.
 
Upvote 0

Forum statistics

Threads
1,214,636
Messages
6,120,669
Members
448,977
Latest member
moonlight6

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