May 05 2021 11:57 AM
Hi,
I am having trouble with adding a wildcard to my Xlookup formula. When it is using the exact text "Deliver" or a cell reference it works fine but as soon as I try to add a * wildcard before or after it errors out. So my question is, can you add wildcards to the following formula?
=XLOOKUP(1,("Deliver"=C$4:Q$4)*(Dates>=TODAY()),C$3:Q$3,,2,1)
I would like the ability to get a return on "4am Delivery" or "Delivery of Casegoods" etc
Thanks in advance.
May 05 2021 12:18 PM
@JaseBass Perhaps like this?
=XLOOKUP(1,(G$1=$C4:$Q4)*(Dates>=TODAY()),C$3:Q$3,"-",2,1)
Not sure though where "4am Delivery" or "Delivery of Casegoods" comes in here.
Added "-", just to show that no match was found.
May 05 2021 12:25 PM
May 05 2021 12:27 PM
May 05 2021 12:40 PM
May 05 2021 01:12 PM - edited May 05 2021 01:14 PM
As variant
=LET(
next, --(Dates>=TODAY()),
flag, IFERROR(SEARCH(G1,DeliveryData),0),
ind, SEQUENCE(,COLUMNS(Dates)),
pos, MMULT(ind*flag,TRANSPOSE(next)),
IF(pos=0,"-",INDEX(Dates,1,pos)))
May 05 2021 01:44 PM
May 05 2021 02:13 PM
SolutionYou should specify the desired results.
=XLOOKUP(1,(Dates>=$E$1)*ISNUMBER(SEARCH($G$1,C4:Q4)),Dates,"no match",0,-1)
May 05 2021 02:32 PM