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!
 

Some videos you may like

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,201
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.
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,201
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,514
Messages
5,602,093
Members
414,501
Latest member
mdhaumyu

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
Top