Forum Discussion
Bbirgit
Jan 26, 2022Copper Contributor
mehrfache Istfehler in sverweis verschachteln
Liebe community, ich versuche Wechselkurse mittels SVerweis zu ermitteln. Ermittlung ist immer pro Monat. Suchkriterium ist der Tag B3 in Tabellenblatt1, Zweispaltenmatrix mit TT = F und Kurs = G ...
PeterBartholomew1
Jan 26, 2022Silver Contributor
Finding the closest match to a given date is something of a challenge even using Excel 365!
= LET(
matchedDates, IF(unit=lookupVal,date),
nearestDates, XLOOKUP(requiredDate, matchedDates, date,0,{-1,1}),
searchDirection, IF(AVERAGE(requiredDate-nearestDates)>1,1,-1),
XLOOKUP(requiredDate, IF(unit=lookupVal, date),rate,0,searchDirection))The formula looks up to date of both the preceding and subsequent matches and averages the intervals to identify the direction of the closest. The final lookup returns the corresponding value.
I suspect this is going to be a challenge using legacy versions of Excel.
Bbirgit
Jan 26, 2022Copper Contributor
Vielen Dank Peter für die schnelle Antwort. Mir ist das leider zu hoch. Ich helfe mir jetzt mit Hilfsspalten, das bläst die Tabelle zwar etwas auf, aber es funktioniert auch. Danke!