LEN, SEARCH and wildcards

1 / 5

Which names use the short form "Ltd"? Show "Yes" if the name contains "ltd" in any capitals. "Limited" in full is a No.

keyboard Typing formulas is easiest on a computer with a keyboard.

A1
ABC
1SupplierLtd?
2Lumen Limited
3Meridian Group
4Delta Limited
5Bolt Group
6Harbour Ltd
7Nimbus LTD
8Fernwood Ltd
9Ember Ltd
10
11
12
13
names
Yes or No
Type to enter a value or a formula starting with =. F2 edits, F4 adds $ to a reference.
Study notes

How LEN and SEARCH and COUNTIF works

  • How do you measure text?

    LEN counts the characters in a cell, spaces included: =LEN(A2). It's handy for spotting codes that are too short, or have a space on the end.

  • How do you find a word inside text?

    SEARCH gives the position where the word starts: =SEARCH("ltd",A2). If it isn't there, you get the error #VALUE!. SEARCH ignores capitals; FIND does the same job but is case-sensitive.

  • What are wildcards?

    In COUNTIF and similar functions, * means "any characters" and ? means "exactly one character". =COUNTIF(A2:A9,"*ltd*") counts the names with "ltd" anywhere in them.

Know someone fighting with a spreadsheet? Send them this page.