Created
July 24, 2026 22:59
-
-
Save ncalm/2465d3e2a5b3b18c46e88da87fe105cf to your computer and use it in GitHub Desktop.
VSTACK.PAD and HSTACK.PAD Excel LAMBDA functions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PADSTACK = LAMBDA(function, | |
| LAMBDA(item1,item2,position, | |
| LET( | |
| fn,IF(function=1,VSTACK,HSTACK), | |
| e_rows,IF(function=1,ROWS(item2),position-1), | |
| e_cols,IF(function=2,COLUMNS(item2),position-1), | |
| IF( | |
| AND(e_cols>0,e_rows>0), | |
| LET( | |
| e,MAKEARRAY(e_rows,e_cols,LAMBDA(r,c,NA())), | |
| e_item2,IF(function=1,HSTACK,VSTACK)(e,item2), | |
| fn(item1,e_item2) | |
| ), | |
| fn(item1,item2) | |
| ) | |
| ) | |
| ) | |
| ); | |
| VSTACK.PAD = PADSTACK(1); | |
| HSTACK.PAD = PADSTACK(2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment