XLOOKUP dates & text wild card

mmco

New Member
Joined
Nov 18, 2022
Messages
2
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
Hello,

Attempting to use XLOOKUP to match a date and a wild card text match. Not sure what I am doing wrong, or if this is possible.

=XLOOKUP(1,($A$2:$A$21=B3)*($E$2:$E$21="*"&C3&"*"),!$F$2:$F$21,"Not Found",2)

Where B3 is the date and C3 is a text string that I am trying to use from a longer text string (for example just "Neon", from "Downtown Blue Neon")

I can get each separate lookup to work individually, so I think I am doing something wrong trying to insert a wildcard search as one of multiple criteria, and am unsure how to do this, or if it is possible.

Also, a secondary question on this, my source data dates come in as 11/17/2022 8:01:00 PM format, but I am only entering the date as 11/17/2022 for a search criteria. I've created a workaround by having a column in the source data convert the date/time to just the date, and that works, but was wondering if there was a way for the XLOOKUP to sort for this automatically? And what if there are same dates, but different times?

Hope that makes sense and thanks in advance!
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Hi, you can't use the boolean logic like that with the wildcard search mode.

You could try this though, which address both of your questions.

Excel Formula:
=XLOOKUP(1,(INT($A$2:$A$21)=B3)*(ISNUMBER(SEARCH($C$3,$E$2:$E$21))),$F$2:$F$21,"Not Found",0)
 
Upvote 0
Solution
Thanks a bunch. I'll dig into this so I can understand what is going on.

Thanks again!
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top