Formula to find a ticket number in a list of winning tickets

Nlhicks

Active Member
Joined
Jan 8, 2021
Messages
264
Office Version
  1. 365
Platform
  1. Windows
What formula can I use to mark the middle column with a True or False if the ticket number is found in the winning tickets? I tried using =IF(VLOOKUP(AF2641, 'Ticket Number'!$A:$A,1,FALSE),TRUE,FALSE) but ran into problems when other numbers were checked.


Ticket NumberWinning Tickets
111111​
652558
222222​
652558
655610​
652559
659420​
658009
655620​
659420,659421
652504​
659120,659421,659420
655620​
658174,658174
653300​
652638
659376​
659160
659484​
659424,652806
659422,659423
659376,659377,659378,652484,659376
655765,655510
640349,640350
640246,653300,659817,653302,659819
659181,659184
659180,659186
655521,658176
655521,652520
652501
652474,652504
652474,652505
655617,655618,655619,655620,655621,655622,655623
652504,652538
652504,652531
655610
655617,655618,655619,655620,655621,655622,655623
652464
 
Last edited:

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Try

Libro2
ABC
1Ticket NumberWinning Tickets
2111111FALSO652558
3222222FALSO652558
4655610FALSO652559
5659420VERDADERO658009
6655620FALSO659420,659421
7652504FALSO659120,659421,659420
8655620FALSO658174,658174
9653300FALSO652638
10659376VERDADERO659160
11659484FALSO659424,652806
12659376,659377,659378,652484,659376
Hoja1
Cell Formulas
RangeFormula
B2:B11B2=IFERROR(IF(MATCH("*"&A2&"*",C:C,0),TRUE),FALSE)
 
Upvote 0
Solution
here's another option
Book1
ABC
1Ticket NumberWinning Tickets
2111111FALSE652558
3222222FALSE652558
4655610TRUE652559
5659420TRUE658009
6655620TRUE659420,659421
7652504FALSE659120,659421,659420
8655620TRUE658174,658174
9653300TRUE652638
10659376TRUE659160
11659484TRUE659424,652806
12659422,659423
13659376,659377,659378,652484,659376
14655765,655510
15640349,640350
16640246,653300,659817,653302,659819
17659181,659184
18659180,659186
19655521,658176
20655521,652520
21652501
22652474,652504
23652474,652505
24655617,655618,655619,655620,655621,655622,655623
25652504,652538
26652504,652531
27655610
28655617,655618,655619,655620,655621,655622,655623
29652464
Sheet1
Cell Formulas
RangeFormula
B2B2=IFERROR(IF(MATCH(A2,UNIQUE(TEXTSPLIT(TEXTJOIN(",",TRUE,$C$2:$C$29),",")))>0,TRUE),FALSE)
B3:B11B3=IFERROR(IF(MATCH(A3,UNIQUE(TEXTSPLIT(TEXTJOIN(",",TRUE,$C$2:$C$29),",")))>0,TRUE,FALSE),FALSE)
 
Upvote 1
How would this change if I need to check all of the ticket numbers against each row of the winning tickets? In other words, I need to look at each row of winning tickets and parse through each ticket number to see if that ticket number is in that row of the winning tickets then do the same thing to each row?Put a True if that row contains at least one ticket number or False otherwise.
 
Upvote 0
How would this change if I need to check all of the ticket numbers against each row of the winning tickets? In other words, I need to look at each row of winning tickets and parse through each ticket number to see if that ticket number is in that row of the winning tickets then do the same thing to each row?Put a True if that row contains at least one ticket number or False otherwise.
I keep ending up with #SPILL using this formula =IFERROR(IF(MATCH("*"&A2:A52&"*",'UMZ Contingencies'!AF2,0),TRUE,),FALSE)
 
Upvote 0
T202310a.xlsm
ABCDE
1Ticket NumberRowWinning Tickets
2111111  652558 
3222222  652558 
4655610  652559 
5659420TRUE6658009 
6655620  659420,659421TRUE
7652504  659120,659421,659000 
8655620  658174,658174 
9653300  652638 
10659376TRUE12659160 
11659484  659424,652806 
12659376,652806TRUE
13
2i
Cell Formulas
RangeFormula
B2:B11B2=IFERROR(MATCH("*"&A2&"*",D:D,0)>0,"")
C2:C11C2=IF(B2=TRUE,MATCH("*"&A2&"*",D:D,0),"")
E2:E12E2=IF(ISNUMBER(MATCH(ROW(),$C$2:$C$11,0)),TRUE,"")
 
Upvote 1
keep ending up with #SPILL using this formula =IFERROR(IF(MATCH("*"&A2:A52&"*",'UMZ Contingencies'!AF2,0),TRUE,),FALSE)

I'm confused.
Where is the Ticket Number data?
Where is the Winning Tickets data?

You must specify which sheet and which column the data is in.

Please, use xl2bb tool to put a sample of your 2 sheets.
 
Upvote 1

Forum statistics

Threads
1,223,885
Messages
6,175,183
Members
452,615
Latest member
bogeys2birdies

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