• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Highlight row based on specific text through vba

Status
Not open for further replies.

anuwers

Member
Dear Friends / Sirs,

Please help me to solve this issue which i am facing in my office on daily basis.
.
I am using more than 80 sheets on a workbook.
Each sheet on the column F, I write status as DONE or CANCELLED or PENDING
i start my record writing from A1 to U1 and in row wise....in all the 80 sheets.
.
Expectation is : Need a VBA CODE

If i write "Done" in F column, i need the whole row from A to U to be highlighted with Red Color.
If F column change with other than Done, it should become as normal.
It required to work on all 80 sheets.

Please support.
 
Hi !

Just paste this code within ThisWorkbook module :​
Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
 If Target.Column = 6 Then Target(1, -4).Resize(, 21).Font.ColorIndex = -(Target.Value = "Done") * 3
End Sub
Do you like it ? So thanks to click on bottom right Like !
 
Dear Marc,

Thanks it is working in all the sheets.
1)But when the letters changed with upper/lower characters text is not changing the color. If as it is "Done", then it is working
2)Font color changing with Red color in all the rowfrom A to U, when it is written "Done", but i required to highlight row with Yellow back ground color

Thanks
 
Dear Marc,

Suppose if i want to add one more condition to highlight which is rejected. Can you please provide the code.
 
Dear Marc,

Thanks it is working in all the sheets.
1)But when the letters changed with upper/lower characters text is not changing the color. If as it is "Done", then it is working
2)Font color changing with Red color in all the rowfrom A to U, when it is written "Done", but i required to highlight row with Yellow back ground color

Thanks
 
Currently you have helped on the code as " If we write "Done" in F column, all the words from A to U becomes red color.
My post no: 5 question was. Similarly if i write another word in F column, (let's say "Cancelled", i need another to be displayed from A to U
.
Also the post no: 7 also to be sorted out.
 

The question is : why do you continue on another forum
with conditional formating ?‼

It's a case of wild cross posting that is very not appreciated
on any forum !

So for the condition you can add it like in actual code.

For background color, you can mod the code just by
activating first Macro recorder to change a background cell,
you will have your own free code to include to mine …
 
Status
Not open for further replies.
Back
Top