I am working on Google Sheets and my data is Col A Date and Col B Item Name and Col C Item Rate.
I want to get item rate based on Item name but the rate should be nearest to a particular date entered by me. Check the below link of the sheet for better understanding.
or with a space in place of 0
=iferror(arrayformula(vlookup(G2:G&"~"&F2:F,
ARRAY_CONSTRAIN(sort({unique(filter(B2:B,B2:B<>"")),unique(filter(B2:B,B2:B<>"")),sequence(counta(unique(B2:B)),1,0,0),transpose(split(REPT(" ,",counta(unique(B2:B))),","));B2:B&"~"&A2:A,B2:B,A2:A,C2:C},2,1,3,1),
count(A2:A) counta(unique(B2:B)),4)
,4,1)))