Create Macro to Tag Text

G

Guest

Can someone help me with a macro?

I've got an excel worksheet with a huge number of rows. I want to identify
any row that contains certain text and tag that row with an "X" or something
that I can sort by in a new column. Does that make sense?

In other words, I'm in sales and have a huge list of customers with
products, I need to pull out any customer that has a specific product.
 
G

Guest

Before getting into coding, you might look at a couple of things.

First, look at AutoFilter. Choose the top cell in the column of interest
and use Data | Filter |AutoFilter - then you will be able to choose from the
list to show just the rows with information you want to see in that column.

To put an X somewhere to show a match, assume that data is in column A for
this one, starting at row 2, assume column W is your first empty column. And
you want to identify rows with "bag of confetti" in column A.
In W2 put this
=IF(A2="bag of confetti","X","")
just extend the formula down the sheet. But that's only handy if you're
looking for one thing - have to change the "bag of confetti" each time you
want to look for something new. Better way:
in W2 put this
=IF(A2=$X$2,"X","")
extend down the rows.
Then i X2 write the phrase you're looking for in column A and Xs will show
up in W to indicate that. Change the phrase, change which show up with X.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top