excelNewbie22
Well-known Member
- Joined
- Aug 4, 2021
- Messages
- 528
- Office Version
- 365
- Platform
- Windows
hi!
have a list of numbers either separate or joined (whatever is more comfortable)
1 2 3 4
1234
1235
1236
1237
1237
1345
1346
1347
for thousands of rows
i want to check IF there's 3 out of the 4, in any order, for each line, in the next (upwards) 10 rows
and also 4 out of 4 in any order and etc....
edit: for the one below
got it with multiple =AND(COUNTIFS(
and if it's allowed another small question:
for testing and calc the data for the above question,
it seems i can't use IF and AND with numbers?
trying to to check if and combination of 3's from 1234 are repeating
1,2,3 or 1,2,4 or 1,3,4 or 2,3,4
and like you see it retures true=1 when it shouldn't
have a list of numbers either separate or joined (whatever is more comfortable)
1 2 3 4
1234
1235
1236
1237
1237
1345
1346
1347
for thousands of rows
i want to check IF there's 3 out of the 4, in any order, for each line, in the next (upwards) 10 rows
and also 4 out of 4 in any order and etc....
20.xlsm | |||||||
---|---|---|---|---|---|---|---|
C | D | E | F | G | |||
4 | 2 | 1 | 8 | 5 | 5812 | ||
5 | 7 | 4 | 1 | 3 | 3147 | ||
6 | 7 | 4 | 2 | 1 | 1247 | ||
7 | 3 | 1 | 1 | 7 | 7113 | ||
8 | 1 | 3 | 1 | 4 | 4131 | ||
9 | 4 | 6 | 4 | 3 | 3464 | ||
10 | 8 | 8 | 5 | 4 | 4588 | ||
11 | 2 | 1 | 7 | 3 | 3712 | ||
12 | 8 | 8 | 7 | 2 | 2788 | ||
13 | 2 | 2 | 8 | 1 | 1822 | ||
14 | 8 | 3 | 7 | 4 | 4738 | ||
15 | 4 | 4 | 2 | 2 | 2244 | ||
16 | 7 | 3 | 1 | 7 | 7137 | ||
17 | 7 | 1 | 3 | 1 | 1317 | ||
20 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
G4:G17 | G4 | =F4&E4&D4&C4 |
Cells with Conditional Formatting | ||||
---|---|---|---|---|
Cell | Condition | Cell Format | Stop If True | |
G:G | Cell Value | =1 | text | NO |
G:G | Cell Value | =1 | text | NO |
edit: for the one below
got it with multiple =AND(COUNTIFS(
for testing and calc the data for the above question,
it seems i can't use IF and AND with numbers?
trying to to check if and combination of 3's from 1234 are repeating
1,2,3 or 1,2,4 or 1,3,4 or 2,3,4
and like you see it retures true=1 when it shouldn't
Cell Formulas | ||
---|---|---|
Range | Formula | |
E1:E4 | E1 | =IF(AND(A1:D1,"1", A1:D1,"2", A1:D1,"3"),1,0) |
F1:F4 | F1 | =IF(AND(A1:D1,"1", A1:D1,"2", A1:D1,"4"),1,0) |
G1:G4 | G1 | =IF(AND(A1:D1,"1", A1:D1,"3", A1:D1,"4"),1,0) |
H1:H4 | H1 | =IF(AND(A1:D1,"2", A1:D1,"3", A1:D1,"4"),1,0) |
Last edited: