Thanks ashish for code it helped me a lotnow i developed the code to be: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 19 And Target.Count >= 1 Then Select Case Target.ValueCase "A"Target.EntireRow.Interior.Color = RGB(192, 192, 192)Case "C"Target.EntireRow.Interior.Color = RGB(255, 255, 0)Case "C"Target.EntireRow.Interior.Color = RGB(255, 255, 0)Case "C"Target.EntireRow.Interior.Color = RGB(255, 255, 0)Case "C"Target.EntireRow.Interior.Color = RGB(255, 255, 0)Case "C"Target.EntireRow.Interior.Color = RGB(255, 255, 0)End SelectEnd IfEnd Sub everything is ok., but when i pull + for any cell to Repeat letter "A" for example to fill more than on cell & automatically color fill also, it's return an error to me, how can i avoid it??
Best regards, Ahmed galal Mohamed Procurement Engineer Head Office : SQUARE Engineering Firm Tel :(202) 2402 8846 Fax :(202) 2405 0476 Mobile :(010) 9 62 60 61 Website : http://www.square.com.eg 31 Lebanon St. Mohandsen, Giza, Egypt Date: Sun, 3 Jul 2011 20:41:40 +0530 Subject: Re: $$Excel-Macros$$ How to use Event Change to Change Color of Row From: koul.ash...@gmail.com To: excel-macros@googlegroups.com Private Sub Worksheet_Change(ByVal Target As Range) If Target.Count = 1 And Target.Column = 19 ThenRange("a" & Target.Row).Interior.Color = RGB(192, 192, 192) Range("b" & Target.Row).Interior.Color = RGB(192, 192, 192) Range("d" & Target.Row).Interior.Color = vbYellowRange("c" & Target.Row).Interior.Color = vbYellow Range("r" & Target.Row).Interior.Color = RGB(255, 0, 0)Range("w" & Target.Row).Interior.Color = vbGreenEnd If End Sub On Sun, Jul 3, 2011 at 5:45 PM, Ahmed galal <ahmed.ga...@live.com> wrote: Hi all,I need to know how to use Event Change to Change Color of Row according to changing in specified Column cells.for example:I have column "S" any cell in it take code A,B,C,D,R & W. I need when any cell change in the column "S" taken one of the previous 6 codes, then the Row of it change to specified colorA,B = Grey ColorC,D = Yellow colorR = Reed Color W = Green Color Best regards, Ahmed galal Mohamed Procurement Engineer Head Office : SQUARE Engineering Firm Tel :(202) 2402 8846 Fax :(202) 2405 0476 Mobile :(010) 9 62 60 61 Website : http://www.square.com.eg 31 Lebanon St. Mohandsen, Giza, Egypt -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel -- Regards Ashish Koul akoul.blogspot.com http://akoul.posterous.com/ akoul.wordpress.com My Linkedin Profile P Before printing, think about the environment. -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel