Skip to content

Instantly share code, notes, and snippets.

View havishmad's full-sized avatar
💭
Coding by Day - Gaming by Night

HAVISH MADHVAPATY havishmad

💭
Coding by Day - Gaming by Night
View GitHub Profile
@havishmad
havishmad / Combined_Unique
Created July 9, 2022 14:56
Find Unique Values from Combined Columns
/*
Name: Unique from Combined
Description: Find Unique Values from COmbined Columns
Written By: Havish Madhvapaty
*/
Combined_Unique =
LAMBDA(col_1, col_2,
LET(
combined, SORT(DROP(UNIQUE(col_1 & "," & col_2), 2)),
@havishmad
havishmad / End_Of_Quarter.lambda
Last active July 9, 2022 14:53
End of Quarter
/*
Name: End of Quarter
Description: Find End of Quarter
Written By: Havish Madhvapaty
*/
End_Of_Quarter =
LAMBDA(my_date, EOMONTH(my_date, MOD(3 - MONTH(my_date), 3)))
@havishmad
havishmad / Start_Of_Quarter.lambda
Last active July 9, 2022 14:52
Start of Quarter
/*
Name: Start of Quarter
Description: Find Start of Quarter
Written By: Havish Madhvapaty
*/
Start_Of_Quarter =
LAMBDA(my_date, DATE(YEAR(my_date), FLOOR.MATH(MONTH(my_date) - 1, 3) + 1, 1))
@havishmad
havishmad / Insert_Blank_Rows.lambda
Last active July 9, 2022 14:52
Insert Blank Rows
/*
Name: Insert Blank Rows
Description: Insert Blank Rows after Each Row
Written By: Havish Madhvapaty
*/
Insert_Blank_Rows =
LAMBDA(range,
LET(
data, range,
@havishmad
havishmad / RC_Position.lambda
Last active June 30, 2022 07:45
RC Position
/*
Name: RC Position
Description: Find Row and Column Position of a value within a range
Written By: Havish Madhvapaty
*/
RC_Position =
LAMBDA(search_val, my_range,
LET(
position, FIND("1", TEXTJOIN("", TRUE, --NOT(ISERROR(SEARCH(search_val, my_range))))),
/*
Name: Choose_Columns
Description: Choose the selected columns
Written By: Havish Madhvapaty
*/
Choose_Columns =
LAMBDA(My_Range, ColsToSelect,
LET(
FirstColToSelect, INDEX(ColsToSelect, 1, 1),
@havishmad
havishmad / Lookup_Unclean_Data.lambda
Created June 10, 2022 06:06
Lookup Unclean Data
/*
Name: Lookup_Unclean_Data
Description: Apply VLOOKUP where numbers are in text format in either lookup value or table array
Written By: Havish Madhvapaty
*/
Lookup_Unclean_Data =
LAMBDA(lookup_values, lookup_array, return_array, if_error, [error_text],
LET(
formula, XLOOKUP(VALUE(lookup_values), VALUE(lookup_array), return_array),
/*
Name: Unpivot
Description: Unpivot data to convert pivot table into tabular data
Written By: Havish Madhvapaty
*/
Unpivot =
LAMBDA(input,
LET(
source, input,
@havishmad
havishmad / Extract_Name_Part.lambda
Last active June 10, 2022 15:44
Extract Name Part
/*
Name: Extract_Name_Part
Description: Find first, middle, last name [input: 1 - First, 2 - Middle, 3 - Last]
Written By: Havish Madhvapaty
*/
Extract_Name_Part =
LAMBDA(my_range, input,
SWITCH(
input,
@havishmad
havishmad / Select_Range_Till_Last_Cell.lambda
Created June 10, 2022 05:42
Select Range Till Last Cell
/*
Name: Select_Range_Till_Last_Cell
Description: Select all values in the column (my_column) by defining the first cell with a value (firstrow)
Written By: Havish Madhvapaty
*/
Select_Range_Till_Last_Cell =
LAMBDA(mycolumn,firstrow,
LET(mycolumnletter,
SUBSTITUTE(ADDRESS(1, COLUMN(mycolumn), 4), "1", ""),