Skip to content

Instantly share code, notes, and snippets.

@ExcelExciting
Created December 31, 2023 09:51
Show Gist options
  • Save ExcelExciting/be50efb6d74d2407a11e93acdc2d7d99 to your computer and use it in GitHub Desktop.
Save ExcelExciting/be50efb6d74d2407a11e93acdc2d7d99 to your computer and use it in GitHub Desktop.
Lambda - 00005 - TABLES
/*
--------------------- MATHS TABLES ---------------------
*/
TABLES=
LAMBDA(Table_Of,[Until],
/* Mathematics Tables, It is fun to have our tables in excel.
I saw many teachers are struggling to make table in word or in excel.
So here is the simple Excel Function that can return to us the table.
By defaults take only 12 times [Until] and you are flexible to change it as per your need.
SYNTAX: =TABLE(Table_Of, [Until])
EXAMPLE:
=TABLE(2,3)
RESULT:
02 x 01 = 02
02 x 02 = 04
02 x 03 = 06
author,"Faraz Shaikh, Microsoft® MVP",
wesite,"www.ExcelExciting.com",
Created,"20231231",
*/
LET(
_tableNumber, Table_Of,
_tableRows, IF( ISOMITTED(Until), 12 , Until),
_genNumber, SEQUENCE(_tableRows, , _tableNumber, 0),
_gentablesequence, SEQUENCE(_tableRows, , 1, 1),
_calculatetable, TEXT(MAP(_genNumber, _gentablesequence, LAMBDA(a, b, a * b)), "00"),
_combine, HSTACK(
TEXT(_genNumber, "00") & " x " & TEXT(_gentablesequence, "00") & " = " & _calculatetable
),
_result, _combine,
_result
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment