Inserting TextJoin results into VLookUp formula

helpcharity

New Member
Joined
Apr 25, 2019
Messages
8
Office Version
  1. 2019
Platform
  1. Windows
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

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
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
I'm using (desktop) Office Professional 2019. I also have access to "Microsoft Office 365 E1".
 
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,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

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