TopicsCheat sheetLessons
Lurndo › Excel › Wildcards

Learning Excel: Wildcards

Wildcards

"How many dresses did we sell?" The labels say Dress green, Dress black… None of them is called just Dress. Time for wildcards.

The asterisk

In a criterion, * stands for "any characters, or none at all". "Dress*" matches anything that starts with Dress.

=COUNTIF(A2:A16,"Dress*") finds three items: Dress green, Dressing gown and Dress black. The dressing gown too, because anything may come after Dress.

I2
fx

=COUNTIF(A2:A16,"Dress*")

ABCDEFGHI
1ItemCategoryPriceDayVolunteerLimit
2Dress greenClothing£12.00MonSophie£10.003
3Book fictionBooks£2.00MonOmar
4LampHousehold£8.00TueSophie
5T-shirt SClothing£3.00TueGrace
6Dressing gownClothing£6.00WedOmar
7PuzzleToys£4.00WedGrace
8Book cookingBooks£3.00ThuSophie
9RadioElectrical£15.00ThuOmar
10T-shirt XLClothing£4.00FriSophie
11Dress blackClothing£18.00FriGrace
12What? GameToys£5.00SatOmar
13VaseHousehold£7.00SatGrace
14T-shirt MClothing£3.00SatSophie
15BookendHousehold£9.00SatOmar
16Kids' bikeToys£35.00SatGrace
17

The question mark and the tilde

? stands for exactly one character. "T-shirt ?" matches T-shirt S and T-shirt M, but not T-shirt XL: that's two characters.

Looking for a real question mark or asterisk? Put a tilde in front of it: "What~?*" finds "What? Game".

Try it yourself

How many items have something to do with books? In I2, count every item with "book" in it, anywhere.

ABCDEFGHIJ
1ItemCategoryPriceDayVolunteerLimit
2Dress greenClothing£12.00MonSophie£10.00
3Book fictionBooks£2.00MonOmar
4LampHousehold£8.00TueSophie
5T-shirt SClothing£3.00TueGrace
6Dressing gownClothing£6.00WedOmar
7PuzzleToys£4.00WedGrace
8Book cookingBooks£3.00ThuSophie
9RadioElectrical£15.00ThuOmar
10T-shirt XLClothing£4.00FriSophie
11Dress blackClothing£18.00FriGrace
12What? GameToys£5.00SatOmar
13VaseHousehold£7.00SatGrace
14T-shirt MClothing£3.00SatSophie
15BookendHousehold£9.00SatOmar
16Kids' bikeToys£35.00SatGrace
17
I2

Ready for more?

The full lesson has 5 exercises, from easy to challenging, with hints, points and a streak you can build.

Start the lesson
← PreviousCriteria with operatorsNext →Adding up what matches

SQL

  • Topics
  • All lessons
  • Cheat sheet

Excel

  • Topics
  • All lessons
  • Shortcuts

HTML & CSS

  • About the course
  • All lessons

Lurndo

  • Dashboard
  • Leaderboard
  • Premium
  • Account
  • Privacy
Nederlands