Did you attached Wrong file ?
Regards Rajan verma +91 7838100659 [IM-Gtalk] From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] On Behalf Of Jorge Marques Sent: 02 May 2012 15:36 To: excel-macros@googlegroups.com Subject: $$Excel-Macros$$ Help on Changing code on Color Macro Hi guys, i have this Macro that i use for color changing if the cell is "Sim" red color and if the cell is "Não" green color, but i have the following problems: 1. How can i stop the macro when it finds the first empty cell, as it is defined to 65536 it only stops there, can i do like an Range("A1").select Range(Selection, Selection.End(xldown)).Select 2. This excel is embebeded is a powerpoint, i need it at 00:00 to run the macro (to this i´m doing a exe to put in windows scheduler, the computer is always on, what do you think? or as the excel is embedded in ppt i do a applicationTime trigger?) 3. In another slide of the powerpoint i have another sheet of the excel where it counts the day until "Não" then if it finds a "Não" i returns to 0 and starts counting again Can you help me thank you very much the current code is: Sub colorcell() On Error Resume Next Dim current As String For i = 1 To 65536 celulas = "A" & i Range(celulas).Select If Range(celulas).Text = "Não" Then With Selection.Interior .ColorIndex = 3 .Pattern = xlSolid .PatternColorIndex = xlAutomatic End With End If If Range(celulas).Text = "Sim" Then With Selection.Interior .ColorIndex = 4 .Pattern = xlSolid .PatternColorIndex = xlAutomatic End With End If Next i End Sub -- FORUM RULES (986+ 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 (986+ 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