AOVERLAY

AOVERLAY(a,b,[r],[c],[o])
a
base array
b
array to be overlapped or overlayed
[r]
row coordinate, r, 0 or omitted, top left corner of base array, r<0, nr. of rows on top of base array, r>0, nr. of rows beneath top left corner of base array
[c]
clm coordinate, c, 0 or omitted, top left corner of base array, c<0, nr. of clms to the left of base array, c>0, nr. of rows to the right of top left corner of base array
[o]
0 or omitted, overlapping, <>=0, overlaying

Overlapping/[Overlaying] 2 arrays, using a row/column coordinate system. !!NEW!! MAKEARRAY

Xlambda

Well-known Member
Joined
Mar 8, 2021
Messages
860
Office Version
  1. 365
Platform
  1. Windows
AOVERLAY One function for Overlapping/Overlaying 2 arrays, using a row/column coordinate system. Calls AOVERLAP . !!NEW!! MAKEARRAY
Same as AOVERLAP, has only a new optional argument "o", If "o" is 0 or omitted the function does overlapping, if any value<>0, does overlaying, (areas outside base array, after overlapping, are excluded).
Excel Formula:
=LAMBDA(a,b,[r],[c],[o],
    LET(w,ROWS(a),l,COLUMNS(a),x,AOVERLAP(a,b,r,c),
      IF(o,MAKEARRAY(w,l,LAMBDA(m,n,INDEX(x,IF(r>=0,m,m-r),IF(c>=0,n,n-c)))),x)
    )
)
LAMBDA 1.1.1.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQARASATAUAVAWAXAYAZ
1ar>=0,c>=0, o, omitted OVERLAPPING
2123456c,3c,6
3234567r,,c,,c,1c,2123456123456
4345678ABCD56123456123456234567234567
545679EFH67234567r,2234567r,3345678345678
65678910IJKL78r,334567834ABCD456ABCD45679
7b456794ABCD945EFH567EFHr,55678910
8ABCD56789105EFH1056IJKLIJKLABCD
9EFH=AOVERLAY(A2:F6,A8:D10)IJKL=AOVERLAY(A2:F6,A8:D10,2,2)=AOVERLAY(A2:F6,A8:D10,3,3)EFH
10IJKL=AOVERLAY(A2:F6,A8:D10,3,1)IJKL
11=AOVERLAY(A2:F6,A8:D10,5,6)
12r>=0,c>=0,o,1 OVERLAYING
13=AOVERLAY(A2:F6,A8:D10,,,1)=AOVERLAY(A2:F6,A8:D10,3,1,1)=AOVERLAY(A2:F6,A8:D10,2,2,1)=AOVERLAY(A2:F6,A8:D10,3,3,1)=AOVERLAY(A2:F6,A8:D10,5,6,1)
14ABCD56123456123456123456123456
15EFH67234567234567234567234567
16IJKL7834567834ABCD345678345678
17456794ABCD945EFH456ABC45679
1856789105EFH1056IJKL567EF5678910
19
20r>=0,c<0, o,omitted OVERLAPPING
21c,-1c,-2c,-4
22r,c,-2c,-1 123456 123456 123456
23ABCD3456r,1 123456r,2234567234567234567
24EFH4567ABCD567ABCD678r,3345678345678
25IJKL5678EFH678EFH79ABCD67945679
2645679IJKL79IJKL8910EFH78910r,55678910
2756789105678910=AOVERLAY(A2:F6,A8:D10,2,-1)IJKLABCD
28=AOVERLAY(A2:F6,A8:D10,,-2)=AOVERLAY(A2:F6,A8:D10,1,-1)=AOVERLAY(A2:F6,A8:D10,3,-2)EFH
29IJKL
30=AOVERLAY(A2:F6,A8:D10,5,-4)
31r>=0,c<0, o,1 OVERLAYING
32=AOVERLAY(A2:F6,A8:D10,,-2,1)=AOVERLAY(A2:F6,A8:D10,1,-1,1)=AOVERLAY(A2:F6,A8:D10,2,-1,1)=AOVERLAY(A2:F6,A8:D10,3,-2,1)=AOVERLAY(A2:F6,A8:D10,5,-4,1)
33CD3456123456123456123456123456
34H4567BCD567234567234567234567
35KL5678FH678BCD678345678345678
3645679JKL79FH79CD67945679
3756789105678910JKL8910H789105678910
38
AOVERLAY post 1
Cell Formulas
RangeFormula
AG3:AM8AG3=AOVERLAY(A2:F6,A8:D10,3,3)
AP3:AY10AP3=AOVERLAY(A2:F6,A8:D10,5,6)
I4:N8I4=AOVERLAY(A2:F6,A8:D10)
Q4:V9Q4=AOVERLAY(A2:F6,A8:D10,3,1)
Y4:AD8Y4=AOVERLAY(A2:F6,A8:D10,2,2)
I9,M28,C28,V27,Y9I9=FORMULATEXT(I4)
AG9,AF28,Q10AG9=FORMULATEXT(AG3)
AP11,AP30AP11=FORMULATEXT(AP3)
I13,AP32,AF32,V32,M32,C32,AP13,Q13,Y13,AG13I13=FORMULATEXT(I14)
I14:N18I14=AOVERLAY(A2:F6,A8:D10,,,1)
Q14:V18Q14=AOVERLAY(A2:F6,A8:D10,3,1,1)
Y14:AD18Y14=AOVERLAY(A2:F6,A8:D10,2,2,1)
AG14:AL18AG14=AOVERLAY(A2:F6,A8:D10,3,3,1)
AP14:AU18AP14=AOVERLAY(A2:F6,A8:D10,5,6,1)
V22:AB26V22=AOVERLAY(A2:F6,A8:D10,2,-1)
AF22:AM27AF22=AOVERLAY(A2:F6,A8:D10,3,-2)
AP22:AY29AP22=AOVERLAY(A2:F6,A8:D10,5,-4)
C23:J27C23=AOVERLAY(A2:F6,A8:D10,,-2)
M23:S27M23=AOVERLAY(A2:F6,A8:D10,1,-1)
C33:H37C33=AOVERLAY(A2:F6,A8:D10,,-2,1)
M33:R37M33=AOVERLAY(A2:F6,A8:D10,1,-1,1)
V33:AA37V33=AOVERLAY(A2:F6,A8:D10,2,-1,1)
AF33:AK37AF33=AOVERLAY(A2:F6,A8:D10,3,-2,1)
AP33:AU37AP33=AOVERLAY(A2:F6,A8:D10,5,-4,1)
Dynamic array formulas.
 
Last edited:
Upvote 0
LAMBDA 1.1.1.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQARASATAUAVAW
1ar<0,c<=0, o,omitted OVERLAPPING
2123456c,-4c,-5
3234567c,,c,-1ABCDABCD
4345678ABCDABCDEFHEFH
545679r,-1EFH56r,-1EFH456IJKLIJKL
65678910IJKL67IJKL567r,-3123456
7b345678345678234567r,-4123456
8ABCD4567945679345678234567
9EFH5678910567891045679345678
10IJKL=AOVERLAY(A2:F6,A8:D10,-1)=AOVERLAY(A2:F6,A8:D10,-1,-1)567891045679
11=AOVERLAY(A2:F6,A8:D10,-3,-4)5678910
12=AOVERLAY(A2:F6,A8:D10,-4,-5)
13r<0,c<=0, o,1 OVERLAYING
14=AOVERLAY(A2:F6,A8:D10,-1,,1)=AOVERLAY(A2:F6,A8:D10,-1,-1,1)=AOVERLAY(A2:F6,A8:D10,-3,-4,1)=AOVERLAY(A2:F6,A8:D10,-4,-5,1)
15EFH56FH456123456123456
16IJKL67JKL567234567234567
17345678345678345678345678
1845679456794567945679
195678910567891056789105678910
20
21r<=0,c>0,o, omitted OVERLAPPING
22c,1c,2c,3c,6
23c,1 ABCD ABCD ABCD ABCD
24r,,1ABCD6r,-11EFH6r,-112EFHEFHEFH
252EFH72IJKL723IJKLr,-2123IJKLIJKL
263IJKL8345678345678234567r,-3123456
27456794567945679345678234567
2856789105678910567891045679345678
29=AOVERLAY(A2:F6,A8:D10,,1)=AOVERLAY(A2:F6,A8:D10,-1,1)=AOVERLAY(A2:F6,A8:D10,-1,2)567891045679
30=AOVERLAY(A2:F6,A8:D10,-2,3)5678910
31=AOVERLAY(A2:F6,A8:D10,-3,6)
32r<=0,c>0,o,1 OVERLAYING
33=AOVERLAY(A2:F6,A8:D10,,1,1)=AOVERLAY(A2:F6,A8:D10,-1,1,1)=AOVERLAY(A2:F6,A8:D10,-1,2,1)=AOVERLAY(A2:F6,A8:D10,-2,3,1)=AOVERLAY(A2:F6,A8:D10,-3,6,1)
341ABCD61EFH612EFH123IJK123456
352EFH72IJKL723IJKL234567234567
363IJKL8345678345678345678345678
374567945679456794567945679
3856789105678910567891056789105678910
39
AOVERLAY post 2
Cell Formulas
RangeFormula
Z3:AI10Z3=AOVERLAY(A2:F6,A8:D10,-3,-4)
AL3:AV11AL3=AOVERLAY(A2:F6,A8:D10,-4,-5)
I4:N9I4=AOVERLAY(A2:F6,A8:D10,-1)
Q4:W9Q4=AOVERLAY(A2:F6,A8:D10,-1,-1)
I10,S29,K29,Q10I10=FORMULATEXT(I4)
Z11,AJ31Z11=FORMULATEXT(Z3)
AL12AL12=FORMULATEXT(AL3)
I14,Q14,AJ33,K33,S33,AA33,C33,AL14,Z14I14=FORMULATEXT(I15)
I15:N19I15=AOVERLAY(A2:F6,A8:D10,-1,,1)
Q15:V19Q15=AOVERLAY(A2:F6,A8:D10,-1,-1,1)
Z15:AE19Z15=AOVERLAY(A2:F6,A8:D10,-3,-4,1)
AL15:AQ19AL15=AOVERLAY(A2:F6,A8:D10,-4,-5,1)
K23:P28K23=AOVERLAY(A2:F6,A8:D10,-1,1)
S23:X28S23=AOVERLAY(A2:F6,A8:D10,-1,2)
AA23:AG29AA23=AOVERLAY(A2:F6,A8:D10,-2,3)
AJ23:AS30AJ23=AOVERLAY(A2:F6,A8:D10,-3,6)
C24:H28C24=AOVERLAY(A2:F6,A8:D10,,1)
C29C29=FORMULATEXT(C24)
AA30AA30=FORMULATEXT(AA23)
C34:H38C34=AOVERLAY(A2:F6,A8:D10,,1,1)
K34:P38K34=AOVERLAY(A2:F6,A8:D10,-1,1,1)
S34:X38S34=AOVERLAY(A2:F6,A8:D10,-1,2,1)
AA34:AF38AA34=AOVERLAY(A2:F6,A8:D10,-2,3,1)
AJ34:AO38AJ34=AOVERLAY(A2:F6,A8:D10,-3,6,1)
Dynamic array formulas.
 

Forum statistics

Threads
1,224,836
Messages
6,181,251
Members
453,027
Latest member
Lost_in_spreadsheets

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