LASTUSEDROW returns the last row with an entry in the current sheet (can be used in conjunction with ADDRESS and LASTUSEDCOLUMN to return the intersection of the last column and row)
Excel Formula:
=LAMBDA(rowFrom,
LET(c,IF(rowFrom=0,16000,rowFrom),
i,MAX((MOD(c,10^{1;2;3;4;5})=0)*{1;2;3;4;5}),
j,LOG(c),
k,(j<6)*(j=INT(j)),
x,0+(COUNTA(INDIRECT("R"&c&":R"&MIN(1048576,c+(10^i)-1),FALSE))>0),
return,IF((x*(i=0))=1,c,LASTUSEDROW(c+(x*(10^i))-(10^(i-(x*i)-(k*(x=0)))))),
return
)
)
Upvote
0