Macro to mark a column where text in row (or cell) is as specified

J

Jochem Davids

Hello,

Can somebody help me creating a Macro that can do as follows:

Search for a specific word in a specified column, for instance "red" of
"grey" and when this is found a row in another specified column a, b or c
must be marked with an x.

So, for instance:

a b c
1 red x
2 blue x
3 red x
4 gray x
5 gray x
6 blue x
7 red x

And the x-es will be put in automatically.

Thanks in advance!
 
R

reklamo

Hi Jochen

Why do you want to use a macro?
Just input following formulas into the cells in columns B, C and D:
Column
Row A B C
D
2 red =if(A2="blue";"x";"") =if(A2="red"; "x"; "") =if(A2="gray";
"x"; "")
3 blue =if(A3="blue";"x";"") =if(A3="red"; "x"; "") =if(A3="gray";
"x"; "")
4 gray =if(A4="blue";"x";"") =if(A4="red"; "x"; "") =if(A4="gray";
"x"; "")
etc.
Copy the formulas to all desired rows and you get your "x"

regards
reklamo
 

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