Samgraphics
Board Regular
- Joined
- Jan 9, 2022
- Messages
- 61
- Office Version
- 2011
- Platform
- MacOS
Hi, I'm trying to create conditional formatting that will highlight the cell next to the number combination if that combination has 3 or more matching numbers and the winning number. I'm using =sum(countif()) but it's not producing the correct results. I'm not sure what is causing this. Can you please help me? Here is a snippet of the worksheet.
As you can see I tried different approaches but not getting desired results.
Thank you in advance for your help and time.
ps I was finally able to install the xl2bb add in so if there are any problems i'm sorry.
As you can see I tried different approaches but not getting desired results.
HIGHLIGHT THE LATEST LOTTERY MATCHES.xlsx | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | |||
1 | LOTTERY TICKET PURCHASE HISTORY | |||||||||||||||||
2 | ||||||||||||||||||
3 | LATEST DRAW | |||||||||||||||||
4 | NO 1 | NO 2 | NO 3 | NO 4 | NO 5 | BONUS 1 | BONUS 2 | |||||||||||
5 | 3 | 5 | 10 | 33 | 34 | 7 | 10 | FALSE | < I was testing the formula here before going to conditional formatting | |||||||||
6 | ||||||||||||||||||
7 | ||||||||||||||||||
8 | DATE | NO 1 | NO 2 | NO 3 | NO 4 | NO 5 | BONUS 1 | BONUS 2 | WINNERS | |||||||||
9 | 11/22/21 | 1 | 5 | 6 | 7 | 9 | 9 | 10 | ||||||||||
10 | 1 | 5 | 7 | 8 | 9 | 2 | 12 | |||||||||||
11 | 1 | 9 | 12 | 33 | 34 | 9 | 12 | |||||||||||
12 | 2 | 5 | 6 | 8 | 9 | 9 | 11 | |||||||||||
13 | 19 | 26 | 30 | 32 | 33 | 6 | 9 | |||||||||||
14 | 8 | 10 | 15 | 20 | 33 | 7 | 12 | |||||||||||
15 | 4 | 11 | 15 | 17 | 18 | 3 | 8 | |||||||||||
16 | 7 | 14 | 18 | 20 | 21 | 6 | 11 | |||||||||||
17 | 10 | 17 | 21 | 23 | 24 | 9 | 12 | |||||||||||
18 | 13 | 20 | 24 | 26 | 27 | 3 | 12 | |||||||||||
19 | 16 | 23 | 27 | 29 | 30 | 3 | 6 | |||||||||||
20 | 2 | 16 | 17 | 18 | 34 | 4 | 10 | |||||||||||
21 | 5 | 10 | 21 | 25 | 31 | 5 | 11 | |||||||||||
LotteryTable |
Cell Formulas | ||
---|---|---|
Range | Formula | |
J5 | J5 | =SUM(COUNTIF($A9:$H9,$A$5:$G$5))>=3 |
Named Ranges | ||
---|---|---|
Name | Refers To | Cells |
number07 | =tbllottery[BONUS 2] | J5 |
number08 | =tbllottery[BONUS 1] | J5 |
number09 | =tbllottery[NO 5] | J5 |
numberCheck | =LotteryTable!$B5:INDEX(number09,COUNT(number09),1) | J5 |
numberCheck02 | =LotteryTable!$G5:INDEX(number08,COUNT(number08),1) | J5 |
numberCheck03 | =LotteryTable!$H5:INDEX(number07,COUNT(number07),1) | J5 |
Cells with Conditional Formatting | ||||
---|---|---|---|---|
Cell | Condition | Cell Format | Stop If True | |
I9:I88 | Expression | =SUM(COUNTIF($A9:$H9,$A$5:$G$5))>=3 | text | NO |
A9:A88 | Expression | =SUM(COUNTIF(B9:F9,A5:E5)+COUNTIF($G9:$H9,$F$5:$G$5))>=3 | text | NO |
H9:H88 | Expression | =AND(COUNTIF($G$5,H9),COUNTIF(numberCheck03,H9)=1) | text | NO |
H9:H88 | Expression | =COUNTIF($G$5,H9) | text | NO |
G9:G88 | Expression | =AND(COUNTIF($F$5,G9),COUNTIF(numberCheck02,G9)=1) | text | NO |
G9:G88 | Expression | =COUNTIF($F$5,G9) | text | NO |
B9:F88 | Expression | =AND(COUNTIF($A$5:$E$5,B9),COUNTIF(numberCheck,B9)=1) | text | NO |
B9:F88 | Expression | =COUNTIF($A$5:$E$5,B9) | text | NO |
Thank you in advance for your help and time.
ps I was finally able to install the xl2bb add in so if there are any problems i'm sorry.