Lambda Output to multiple cells

bassplr19

New Member
Joined
Sep 11, 2023
Messages
35
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I created a lambda function to look up the cost of a part and a different function to look up the weight of a part. I want to create a new lambda function that calls both functions and outputs the result across two cells, is that possible?
Gemini suggested this:
Excel Formula:
=LAMBDA(part,QTY,
LET(cost, COST(part, IF(ISOMITTED(QTY), 1, QTY)),
weight, WEIGHT(part, IF(ISOMITTED(QTY), 1, QTY)),
{cost, weight}))
But the name manager seems to fail on the {
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
How about:

Excel Formula:
=LAMBDA(part,QTY,
LET(cost1, COST(part, IF(ISOMITTED(QTY), 1, QTY)),
weight1, WEIGHT(part, IF(ISOMITTED(QTY), 1, QTY)),
HSTACK(cost1,weight1)))
 
Upvote 0
Solution
How about:

Excel Formula:
=LAMBDA(part,QTY,
LET(cost1, COST(part, IF(ISOMITTED(QTY), 1, QTY)),
weight1, WEIGHT(part, IF(ISOMITTED(QTY), 1, QTY)),
HSTACK(cost1,weight1)))
Nice, but it doesn't work IN a Table. It works outside the Table, but I get a #SPILL error inside. Any thoughts?
 
Upvote 0
You cannot use spill ranges in a Table, they simply don't work.
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,155
Members
453,021
Latest member
Justyna P

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