Download as xlsx, pdf, or txt
Download as xlsx, pdf, or txt
You are on page 1of 6

A B C D E F G H I

1
2 Text Contains values? Search: D
3 A, U, G, E 0 U
4 G, E, U, O 0
5 A, N, L, W 0
6 X, Q, D, U 1
7 O, G, P, X 0
8 D, L, B, N 0
9 M, C, F, V 0
10 N, G, O, W 0
11 U, S, D, Q 1
12
13
14
15 The array formula in cell C3 checks if text string in B3 contains all values in F2:F3.
16 0
17 To enter an array formula, type the formula in a cell then press and hold CTRL + SHIFT simultaneously, now press
18
19 The formula bar now shows the formula with a beginning and ending curly bracket telling you that you entered th
20
21 Explaining formula in cell C3
22 The SEARCH function returns the character position of a substring in a text string, it returns an error if not found.
23
24 SEARCH($F$2:$F$3,B3)
25
26 becomes
27
28 SEARCH({"D";"U"},"A, U, G, E")
29
30 and returns {#VALUE!;4}.
31
32 THE COUNT function counts the number of values that contain a number, it conveniently also ignores errors.
33
34 COUNT(SEARCH($F$2:$F$3,B3))
35
36 becomes
37
38 COUNT({#VALUE!;4})
39
40 and returns 1. Only one value in the array is a number.
41
42 Lastly, the equal sign compares the output with number 2.
43
44 COUNT(SEARCH($F$2:$F$3,B3))=2
45
46 becomes
47
A B C D E F G H I
48 1=2
49
50 and returns FALSE in cell C3.
51
52 Modify formula to check if at least one value is found
53 If you want the formula to return TRUE if at least one value is found change the formula to:
54 =COUNT(SEARCH($F$2:$F$3,B3))=>1
55 The possibilities are endless here if you want the formula to return TRUE if at least 2 out of 3 values are found, ch
56 =COUNT(SEARCH($F$2:$F$4,B3))=>2
57 Regular formula
58 This formula is slightly larger but has an advantage of being a regular formula.
59 0
J K L M N O P Q
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
L + SHIFT simultaneously,
17 now press Enter once. Release all keys.
18
racket telling you
19 that you entered the formula successfully. Don't enter the curly brackets yourself.
20
21
ring, it returns22
an error if not found.
23
24
25
26
27
28
29
30
31
onveniently also
32 ignores errors.
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
J K L M N O P Q
48
49
50
51

ue is found
52
53
54
least 2 out of55
3 values are found, change the formula to:
56
57
58
59
A B C D E F
1
2 Text Contains values? Search: D
3 A, U, G, E 0 U
4 G, E, U, O 0
5 A, N, L, W 0
6 X, Q, D, U 0
7 O, G, P, X 0
8 D, L, B, N 0
9 M, C, F, V 0
10 N, G, O, W 0
11 U, S, D, Q 0
A B C D E F
1
2 Text Contains values? Search: D
3 A, U, G, E 0 U
4 G, E, U, O 0
5 A, N, L, W 0
6 X, Q, D, U 0
7 O, G, P, X 0
8 D, L, B, N 0
9 M, C, F, V 0
10 N, G, O, W 0
11 U, S, D, Q 0

You might also like