Using output of LAMBDA within a function

sharshra

Active Member
Joined
Mar 20, 2013
Messages
404
Office Version
  1. 365
I´m making use of LAMBDA function to do a simple repeating job. In the 2nd step, I want to use the output of this function to do another validation. Is it possible to embed the functionality of the 2nd step within the first function?

Consider the following example. LAMBDA function 'f' filter out the blank row. It results in 0 where there is no value in the corresponding column. In this case, there are 3 zeros. I want to use SUBSTITITE function to replace 0 with blanks. At present, I´m doing it in a separate step. Instead, I want this to be part of the first function 'f'.

Source table:
excel problems.xlsx
BCDE
2iddescnameemail
39bldfskjdkjd
49ecewq
51mmoiw
61ddjfjf
75wtikdf
85fxqrqw
95mtxb
105ijvm
115gtjdsf
1210hp
131072dsfa
1410fvqwrq
lambda functions


Filtered table:
excel problems.xlsx
FG
3dfskjdkjd
40oiw
5tikdf
60jdsf
70qwrq
lambda functions
Cell Formulas
RangeFormula
F3:G7F3=LET( f,LAMBDA(filterArray,filterCondition, FILTER(filterArray,filterCondition<>OR("",0),"")), s,f($D$3:$E$14,$E$3:$E$14), s)
Dynamic array formulas.


Desired output (using SUBSTITUTE separately):
excel problems.xlsx
FG
3dfskjdkjd
4oiw
5tikdf
6jdsf
7qwrq
lambda functions
Cell Formulas
RangeFormula
F3:G7F3=LET( f,LAMBDA(filterArray,filterCondition, FILTER(filterArray,filterCondition<>OR("",0),"")), s,f($D$3:$E$14,$E$3:$E$14), SUBSTITUTE(s,0,""))
Dynamic array formulas.
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
I'm glad you figured it out.

But you could also do it very simply as: =LET(f,FILTER(D3:E14,E3:E14<>""),IF(f=0,"",f))
 
Upvote 0

Forum statistics

Threads
1,223,931
Messages
6,175,465
Members
452,646
Latest member
tudou

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