Tuesday, February 20, 2024

How to custom format in excel

Source: https://www.ablebits.com/office-addins-blog/custom-excel-number-format/#decimal-places

Converting a number to MILLIONS in currency without dividing the number by 1000000.

$* #,##0.00,,"M";;"";

Sunday, February 11, 2024

Excel validating whether required columns (marked with *) are filled or not

 Here is the formula

=LET(dataOriginal,A1:C100,

data,FILTER(dataOriginal,BYROW(dataOriginal,LAMBDA(row,SUM(--(row<>""))>0))),

firstRow,MAP(TAKE(data,1),LAMBDA(x,ISNUMBER(SEARCH("~*",x)))),

BYROW(MAP(DROP(data,1),LAMBDA(x,NOT(ISBLANK(x)))),LAMBDA(array, IF(SUMPRODUCT(--(array)*--(firstRow))=SUMPRODUCT(--(firstRow)),"OK","REQUIRED COL VALUE MISSING")))

)