Data manipulation with dynamic arrays

sharshra

Active Member
Joined
Mar 20, 2013
Messages
404
Office Version
  1. 365
I have to do the following tasks based on 2 tables. In the first table (comments table), filter the names which doesn´t have 'y' or 'com' in comments. In the original table, check the status for the names filtered from comments table. If the status has 'a', copy that row to the output.

I´m using dynamic arrays to get the output. I´m getting partially correct result as shown in the actual output below. Can the experts in this forum help please to get the desired output?

Comments table:
excel problems.xlsx
BC
30namecomment
31dsy
32fdy
33reyu
34jklcom
35nmnm.,.,
36vcvn098m,1
37opioq,.-`+
filter


Original table:
excel problems.xlsx
FGH
30namestatusdesc
31nmnma
32opioqa78k
33fda75s
34vcvi098y
35jkli23f
36dsi666a
37mmma9m
38fda
39wwwi
40ytyi
41wqa
42reyuam8
filter


Desired output:
excel problems.xlsx
KLM
30namestatusdesc
31reyuam8
32mmma9m
33opioqa78k
filter


Actual output:
excel problems.xlsx
S
31reyu
32nmnm
33#CALC!
34opioq
filter
Cell Formulas
RangeFormula
S31:S34S31=LET( o, $F$31:$H$42, oName, $F$31:$F$42, oStatus, $G$31:$G$42, i, $B$31:$C$37, iName, $B$31:$B$37, iComment, $C$31:$C$37, fNoCom, FILTER(i,(iComment<>"y")*(iComment<>"com")), fActive, MAP(INDEX(fNoCom,,1), LAMBDA(x, FILTER(oName, (oName=x)*(oStatus="a")))), fActive)
Dynamic array formulas.
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
How about
Excel Formula:
=LET(a,FILTER(B31:B37,(C31:C37<>"y")*(C31:C37<>"com")),FILTER(F31:H42,(G31:G42="a")*(ISNUMBER(XMATCH(F31:F42,a)))))
 
Upvote 0
Thanks for super fast response, @Fluff. I´m getting the desired output :love:
Just one question. I get 0 in the output when desc is blank. How can I retain space & not replace it with 0?
 
Upvote 0
How about
Excel Formula:
=LET(a,FILTER(B31:B37,(C31:C37<>"y")*(C31:C37<>"com")),FILTER(F31:H42&"",(G31:G42="a")*(ISNUMBER(XMATCH(F31:F42,a)))))
 
Upvote 1
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,752
Messages
6,180,743
Members
452,996
Latest member
nelsonsix66

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