AAND, AOR

=AAND(a,ns)

a
array
ns
nothing, always should be ignored, nothing after ","

returns AND or OR values for each row of an array

Xlambda

Well-known Member
Joined
Mar 8, 2021
Messages
860
Office Version
  1. 365
Platform
  1. Windows
AAND , AOR !! recursive !! returns AND or OR values for each row of an array, calls APPEND2V

AAND:
Excel Formula:
=LAMBDA(ar,ns,
    LET(s,IF(ns=0,"",ns),n,ROWS(ar),c,COLUMNS(ar),x,AND(INDEX(ar,n,)),
      IF(n=1,INDEX(APPEND2V(x,s,),SEQUENCE(ROWS(s))),AAND(INDEX(ar,SEQUENCE(n-1),SEQUENCE(,c)),APPEND2V(x,s,)))
    )
)
AOR:
Excel Formula:
=LAMBDA(ar,ns,
    LET(s,IF(ns=0,"",ns),n,ROWS(ar),c,COLUMNS(ar),x,OR(INDEX(ar,n,)),
       IF(n=1,INDEX(APPEND2V(x,s,),SEQUENCE(ROWS(s))),AOR(INDEX(ar,SEQUENCE(n-1),SEQUENCE(,c)),APPEND2V(x,s,)))
    )
)
LAMBDA 6.0.xlsx
ABCDEFGHIJKL
1sample
2abc
3
4x2y3
5A7=A2:D4=""
6find if there are full rows with null strings=AAND(A7#,)check
7FALSEFALSETRUEFALSEFALSEFALSE
8TRUETRUETRUETRUETRUETRUE
9FALSEFALSEFALSEFALSEFALSEFALSE
10=AOR(A7#,)check
11find if we have at least 1 null string on each rowTRUETRUE
12TRUETRUE
13any comparative operationsFALSEFALSE
14will be reflected by each row
15rows with at least one 0 valueany full row of 0 values?
16=NOT(AAND(A17:D19,))check=NOT(AOR(A17:D19,))check
17-2013TRUEFALSEFALSETRUE
180000TRUEFALSETRUEFALSE
191234FALSEFALSEFALSETRUE
20
21AOR(a,ns)=LAMBDA(ar,ns,LET(s,IF(ns=0,"",ns),….....,x,OR(INDEX(ar,n,)),IF(n=1,……..,AOR(INDEX(ar,SEQUENCE(n-1),SEQUENCE(,c)),APPEND2V(x,s,)))))
22to write AXOR we only have to add 3 letters
23AXOR(a,ns)=LAMBDA(ar,ns,LET(s,IF(ns=0,"",ns),…...,x,XOR(INDEX(ar,n,)),IF(n=1,…..,AXOR(INDEX(ar,SEQUENCE(n-1),SEQUENCE(,c)),APPEND2V(x,s,)))))
24
AAND,AOR post
Cell Formulas
RangeFormula
B5B5=FORMULATEXT(A7)
A7:D9A7=A2:D4=""
F6,I16,F16,F10F6=FORMULATEXT(F7)
F7:F9F7=AAND(A7#,)
G7:G9G7=AND(A7:D7)
F11:F13F11=AOR(A7#,)
G11:G13G11=OR(A7:D7)
F17:F19F17=NOT(AAND(A17:D19,))
I17:I19I17=NOT(AOR(A17:D19,))
G17:G19G17=AND(A17:D17,)
J17:J19J17=OR(A17:D17)
Dynamic array formulas.
 
Last edited by a moderator:
Upvote 0

Forum statistics

Threads
1,223,574
Messages
6,173,146
Members
452,502
Latest member
PQCurious

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