How to search a column for a string of text?

Posted on 2011-03-11
Last Modified: 2012-05-11
How to search a column for a string of text?  I want to search for the value in b3, in column AA on sheet2.  The value of b3 could be anywhere withing the string of data housed in column AA

Question by:kgittinger
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 35112518
In a formula or in VBA?

LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 35112558
This array formula will return the row of the first occurrence of the sub-string:


Enter by pressing CTRL+SHIFT+ENTER.

LVL 24

Expert Comment

ID: 35112560
There are many options:
=IF(OR(ISERROR(SEARCH(B3,Sheet2!AA)),B3=""),"Not found","Found")
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 35112691
Correction - you don't need wildcard characters when using the SEARCH function to find a simple substring:


LVL 39

Expert Comment

ID: 35112705
and =COUNTIF(AA:AA,"*" & B3 &"*") will give you the number of matches you got in the column


LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 35112737
Can you provide more information as to what you are trying to do?

Your question is somewhat vague and thus far has prompted three very different solutions. Experts will continue to post varying solutions that will ultimately generate more confusion than clarity.

LVL 50

Accepted Solution

barry houdini earned 500 total points
ID: 35112771
If you want to find the position of the text in the column then MATCH with a wildcard would be a better option than using SEARCH, i.e.


regards, barry

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question