Let Function Failure

nmmounir

New Member
Joined
Jul 26, 2023
Messages
17
Office Version
  1. 365
Platform
  1. Windows
Hello Everyone,

I encountered issues with Let function especially after the 9th variable. I have 2 tables that contains 4 columns. Products' names are all in column 1 and some products are common between the two tables. I need to stack the two tables up, (I do not have VStack) so I am using the index function with the area number (area number is 2) to stack 2 columns only of the two tables.
After that I will do SUMIFS. to accomplish this, I used the Let function and everything was perfectly fine until the final step where the SUMIFS function was used.
Variable f result in cell D14 is :
=LET(a,B3:E11,b,G3:J11,c,MOD(SEQUENCE((2*ROWS(a)),,0),ROWS(a))+1,d,INT(SEQUENCE(2*ROWS(a),,0)/ROWS(a))+1,
e,INDEX((a,b),
c,{1,4},d),
f,FILTER(e,INDEX(e,,1)<>0),f)

so up to f variable, everything is fine, next step is to use SUMIFS which is what I i did in cell B14 as per below but I got a value error. This value error happens to me a lot when I use the Let function after the 9th or 10th Variable.

=LET(a,B3:E11,b,G3:J11,c,MOD(SEQUENCE((2*ROWS(a)),,0),ROWS(a))+1,d,INT(SEQUENCE(2*ROWS(a),,0)/ROWS(a))+1,
e,INDEX((a,b),c,{1,4},d),f,FILTER(e,INDEX(e,,1)<>0),g,INDEX(f,,2),h,INDEX(f,,1),i,UNIQUE(INDEX(f,,1)),SUMIFS(g,h,i))

Can anyone help resolve this puzzle.

1690398261950.png
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
You cannot use sumifs on an array, it only works on a range.
 
Upvote 0
No, but you could try
Excel Formula:
MMULT(--(i=TRANSPOSE(h)),g)
 
Upvote 1
Solution
No, but you could try
Excel Formula:
MMULT(--(i=TRANSPOSE(h)),g)
Out of curiosity, would this approach work with more than 1 SUMIFS criteria? Or would it be up to the new lambda functions?
 
Upvote 0
Glad to help & thanks for the feedback.

@Anonymous1378 yes it can do more than 1 criteria & as the OP doesn't have VSTACK they probably don't have LAMBDA either.
 
Upvote 0

Forum statistics

Threads
1,215,108
Messages
6,123,131
Members
449,097
Latest member
mlckr

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