-1

What I am trying to accomplish:

Source Data:

A B C D E F G H I J K L M
List A 30 0 0 14 0 0 9 0 0 17 0 0 6
List B 17 13 0 0 12 22 21 0 8 0 0 0 7
List C 31 0 0 5 42 1 0 0 0 0 0 0 41

Output:

List A D G M
14 9 6
List B B E I M
13 12 8 7
List C D F
5 1

How would I filter my three lists so that it pulls the letter and corresponding number if the number is greater than 0 but less than 15?

2 Answers 2

2

Using Recursive REDUCE() function:

enter image description here


=LET(
     _Data, A2:N4,
    IFNA(DROP(REDUCE("",SEQUENCE(ROWS(_Data)),LAMBDA(a,b,
    LET(c,CHOOSEROWS(_Data,b),d,DROP(c,,1),
    VSTACK(a,IFNA(HSTACK(@c,FILTER(VSTACK(B1:N1,d),(d>0)*(d<15))),""))))),1),""))

CAVEAT: It is highly suggested not to use the whole empty ranges in the formulas, this is because the functions will be iterating through the empty cells thus making it slower slower and slower, thus affecting the performance.


3
  • is there a way to do this without greek symbols? Commented Jun 11 at 18:49
  • I am still getting zeroes and numbers greater than 15 Commented Jun 11 at 19:45
  • 1
    @KyleMautner I am still waiting to see how the formula is not working, please show me a screenshot. Because when you write in comments that it is not working, should nt be doing it for fun, should have some reason? Commented Jun 11 at 21:02
0

A bit simpler solution for one list at a time (a formula for B9):

=LET(letters,$B$3:$N$3, data,INDEX($B$4:$N$6,MATCH(A9,$A$4:$A$6,0),),
     FILTER(VSTACK(letters,data),(data>0)*(data<15)))

FilterList

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .