ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro to mark a column where text in row (or cell) is as specified (https://www.excelbanter.com/excel-programming/406050-macro-mark-column-where-text-row-cell-specified.html)

Jochem Davids

Macro to mark a column where text in row (or cell) is as specified
 
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!

reklamo

Macro to mark a column where text in row (or cell) is as specified
 
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


"Jochem Davids" wrote:

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!



All times are GMT +1. The time now is 12:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com