Excel Supreme

Excel track · Exercise 52 of 86 Paid

FIND and SEARCH: case-sensitive or not

Choose FIND for a case-sensitive position, SEARCH when case should not matter.

Intermediate

Hyphenated codes and typed labels holding lower-case letters

Read-only data · screen 1 of 2 · answer in B2

In B2, report the position of the hyphen in the code in A2.

AB
1CodePosition
2AN-1042
3BO-2299
4CY-3140

Download this grid (.xlsx) Two tabs: the grid you see, and the answer.

B2

What it does

FIND and SEARCH answer the same question: where inside this text does the needle start. Both count from 1 and both return a position, never the text they found. The only difference is case, and it decides which one you write.

FIND matches case. A code is case-sensitive text, so the hyphen in AN-1042 is found at position 3, and a capital N would not be found in a lower-case label. SEARCH ignores case and finds north, North and NORTH alike.

Use FIND when the character is part of a code and SEARCH when the text was typed by someone else. The wrong choice does not always raise an error: FIND on a label returns #VALUE! only once the cases disagree. The second screen asks for a position in a label, so the function name is what the grader checks.

Syntax

=FIND(needle,text) matches case; =SEARCH(needle,text) ignores it; both answer a position

Worked example

On Hyphenated codes and typed labels holding lower-case letters, =FIND("-",A2) returns 3.

=FIND("-",A2)

Common errors

Error codes for FIND reporting a case-sensitive position and SEARCH ignoring case
ErrorWhat it means and how to fix it
#VALUE!The text you are looking for is not in the cell, and FIND raises #VALUE! instead of returning 0.
Wrong functionSEARCH returns 3 for the hyphen as well, but this screen is graded on FIND, so the answer does not pass.

At work

Locating a separator or a word inside a code or a label before slicing it.