How does this TREND() without a range work

I’m looking at a spreadsheet that gets a result in a cell using something like this :

TREND(
	IF({1,0},
		VLOOKUP(SMALL($AW$2:$AW$20,COUNTIF($AW$2:$AW$20,"<"&B23)),$AW$2:$AX$20,2,0),
		VLOOKUP(LARGE($AW$2:$AW$20,COUNTIF($AW$2:$AW$20,">"&B23)),$AW$2:$AX$20,2,0)
	),
	IF({1,0},
		SMALL($AW$2:$AW$20,COUNTIF($AW$2:$AW$20,"<"&B23)),
		LARGE($AW$2:$AW$20,COUNTIF($AW$2:$AW$20,">"&B23))
	)
	,B23
)

How does this work, as TREND() requires a range ? Do those IF({} do something special to the VLOOKUP ?

B23 is a simple value, and AW2:AW20 and AX2:AX20 are simple cell ranges of numbers.

Ahh, OK the IF somehow makes subranges for immediately above and below the b23 value.