12.3 C
London
Friday, May 10, 2024
HomeSoftware TutorialsExcelHow to Search for a Question Mark in Excel

How to Search for a Question Mark in Excel

Related stories

Learn About Opening an Automobile Repair Shop in India

Starting a car repair shop is quite a good...

Unlocking the Power: Embracing the Benefits of Tax-Free Investing

  Unlocking the Power: Embracing the Benefits of Tax-Free Investing For...

Income Splitting in Canada for 2023

  Income Splitting in Canada for 2023 The federal government’s expanded...

Can I Deduct Home Office Expenses on my Tax Return 2023?

Can I Deduct Home Office Expenses on my Tax...

Canadian Tax – Personal Tax Deadline 2022

  Canadian Tax – Personal Tax Deadline 2022 Resources and Tools...

You can use the following formula to check if a given cell in Excel contains a question mark anywhere in the cell:

=IF(ISNUMBER(SEARCH("~?", A2)), "Yes", "No")

This particular formula checks if cell A2 contains a question mark and returns “Yes” if it does.

Otherwise, it returns “No.”

Note: The tilde symbol (~) in Excel indicates that the next character is a literal.

The following example shows how to use this formula in practice.

Example: Search for Question Mark in Cell in Excel

Suppose we have the following list of phrases in Excel:

Suppose we would like to search each phrase in column A to determine if it contains a question mark or not.

To do so, we can type the following formula into cell B2:

=IF(ISNUMBER(SEARCH("~?", A2)), "Yes", "No")

We can then click and drag this formula down to each remaining cell in column B:

Excel search for question mark in cell

The formula returns “Yes” if the phrase contains a question mark.

Otherwise, it returns “No” if no question mark  is found.

For example, we can see:

  • The first phrase does not contain a question mark.
  • The second phrase does contain a question mark.
  • The third phrase does contain a question mark.

And so on.

Note that if you’d like to return values other than “Yes” and “No”, simply replace these values in the formula with whatever values you’d like.

Also note that you can use the following formula to return TRUE or FALSE to indicate whether a cell contains a question mark or not:

=ISNUMBER(SEARCH("~?", A2))

The following screenshot shows how to use this formula in practice:

The formula returns TRUE or FALSE to indicate whether each phrase contains a question mark or not.

Additional Resources

The following tutorials explain how to perform other common tasks in Excel:

Excel: How to Search for an Asterisk in a Cell
Excel: How to Find Unique Values from Multiple Columns
Excel: How to Match Two Columns and Return a Third

Subscribe

- Never miss a story with notifications

- Gain full access to our premium content

- Browse free from up to 5 devices at once

Latest stories