Inserting TextJoin results into VLookUp formula

helpcharity

New Member
Joined
Apr 25, 2019
Messages
5
Help please,

I have data for the performance of person during a 12 month period, in a worksheet named after them.

I want to create a total's sheet which shows how much fruit each person has picked for certain selected months of the season.

The current forumla works fine: =SUMPRODUCT(VLOOKUP($B10,INDIRECT(F$9&"!"&"$B:$Q"),{6,7,9,10},0))

But I want to replace the text "{6,7,9,10}" with the contents of another cell which uses the TextJoin formula to create "6,7,9,10".

I tried: =SUMPRODUCT(VLOOKUP($B10,INDIRECT(F$9&"!"&"$B:$Q"),INDIRECT("{"&C5&"}",0)))

But this just generates an #REF message



1694442573422.png
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
Ok, for 365 you could use
Excel Formula:
=SUMPRODUCT(VLOOKUP($B10,INDIRECT(F$9&"!"&"$B:$Q"),textsplit(C5,","),0)))
for 2019 what is your textjoin formula
 
Upvote 0
Ok, try
Excel Formula:
=SUMPRODUCT(VLOOKUP($B10,INDIRECT(F$9&"!"&"$B:$Q"),AGGREGATE(15,6,$E$5:$P$5/($E$5:$P$5<>""),TRANSPOSE(ROW(INDIRECT("1:"&COUNTIFS($E$5:$P$5,">0"))))),0))
This may need to be confirmed with Ctrl Shift Enter.
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,140
Messages
6,123,269
Members
449,093
Latest member
Vincent Khandagale

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