Hi Sam I am aware of the possibilities in office 2007 and later. But this sheet will be used by multiple users, someone still in office 2003. Therefore I will save it in the old office format.
I knew where to put Don's code, and that worked, but I then wanted to change the words the conditional formatting depended on, but I was not able to do that in VBA. Thanks for your suggestions. I have tested those in office 2010 and they work great. I would have chosen that solution if I knew that none of the users were in office 2003. Br Finn On 15 Nov., 19:48, Sam Mathai Chacko <samde...@gmail.com> wrote: > Don's code should be pasted in the sheet code module of the corresponding > sheet that you are working on. Please check. By the way, you wouldn't need > VBA for the desired feature if you are using Excel 2007 or greater. > > Sam > > > > > > On Wed, Nov 16, 2011 at 12:03 AM, FJO <goo...@finndj.dk> wrote: > > Hi Don Guillett > > > Thanks for your answer. It works perfect in the example. I then hoped > > I could change a few things and the it would still work, but I can > > not, and I can not see why. > > > Instead of writing "One", "Two" and so on in Colum A, I would like to > > change this for different status, examples could be "Not started", > > Awating info", "Finished" > > > I have tried to put these different status texts into the code, but > > then it does not work. I am new to VBA, so I am sorry if this is > > obvious to others. > > > Br. Finn > > > On 15 Nov., 17:21, "dguillett1" <dguille...@gmail.com> wrote: > > > Right click sheet tab>view code>insert this > > > > Private Sub Worksheet_Change(ByVal Target As Range) > > > If Target.Count > 1 Or Target.Column <> 1 Then Exit Sub > > > Select Case LCase(Target) > > > Case Is = "one": x = 1 > > > Case Is = "one": x = 1 > > > Case Is = "two": x = 6 > > > Case Is = "three": x = 3 > > > Case Is = "four": x = 4 > > > Case Else > > > End Select > > > Rows(Target.Row).Interior.ColorIndex = x > > > End Sub > > > > Don Guillett > > > SalesAid Software > > > dguille...@gmail.com > > > > -----Original Message----- > > > From: FJO > > > Sent: Tuesday, November 15, 2011 7:49 AM > > > To: MS EXCEL AND VBA MACROS > > > Subject: $$Excel-Macros$$ Conditional formatting of entire row using VBA > > > > Hi > > > > Can anyone help me with the VBA code for conditional formatting in > > > Excel. > > > > I have af worksheet of 1000 rows with 5 colums. I have data in colum > > > B;E and would like Excel to format the rows in a colour depending of > > > what I write in colum A. > > > > I have 5 different text imput I can chose for each row, lets call > > > them > > > "one" > > > "two" > > > "Three" > > > "Four" > > > "Five" > > > > ...just to keep this example as simple as possible. > > > > If I write "one" in A2, I would like Excel to color Row 2 in one > > > color, if I write "Two" then another color and so on. > > > > I found out how to color the cell I changed, but I would like to have > > > the whole row colored. > > > > I hope someone can send me an example. > > > > -- > > > FORUM RULES (934+ members already BANNED for violation) > > > > 1) Use concise, accurate thread titles. Poor thread titles, like Please > > > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice > > will > > > not get quick attention or may not be answered. > > > > 2) Don't post a question in the thread of another member. > > > > 3) Don't post questions regarding breaking or bypassing any security > > > measure. > > > > 4) Acknowledge the responses you receive, good or bad. > > > > 5) Cross-promotion of, or links to, forums competitive to this forum in > > > signatures are prohibited. > > > > NOTE : Don't ever post personal or confidential data in a workbook. > > Forum > > > owners and members are not responsible for any loss. > > > ------------------------------------------------------------------------------------------------------ > > > To post to this group, send email to excel-macros@googlegroups.com > > > -- > > FORUM RULES (934+ members already BANNED for violation) > > > 1) Use concise, accurate thread titles. Poor thread titles, like Please > > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice > > will not get quick attention or may not be answered. > > > 2) Don't post a question in the thread of another member. > > > 3) Don't post questions regarding breaking or bypassing any security > > measure. > > > 4) Acknowledge the responses you receive, good or bad. > > > 5) Cross-promotion of, or links to, forums competitive to this forum in > > signatures are prohibited. > > > NOTE : Don't ever post personal or confidential data in a workbook. Forum > > owners and members are not responsible for any loss. > > > ------------------------------------------------------------------------------------------------------ > > To post to this group, send email to excel-macros@googlegroups.com > > -- > Sam Mathai Chacko -- FORUM RULES (934+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com