Hi Jorge,

I think you don’t need any macro for this work, you can do this by
Conditional formatting ..

See the attached file. I have Apply two custom conditional formatting  on
Calendar Range,

 

1)  =DAY(TODAY())=C5

2) =VLOOKUP(C5,Sheet2!$A:$B,2,0)="sim"

 

 

 

Regards

Rajan verma

+91 7838100659 [IM-Gtalk]

 

From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com]
On Behalf Of Jorge Marques
Sent: 03 May 2012 16:09
To: excel-macros@googlegroups.com
Subject: Re: $$Excel-Macros$$ Help on Changing code on Color Macro

 

Yes Rajan you´re absolutely right,  thank you very much, it was supposed to
be the excel in the ppt,

 

I was thinking, instead of putting Green on "Não" and Red "Sim" can´t we do
the macro to put Green whenever the day is = Today() and only put Red if
"Sim" and reset the counter? this way i don´t have to put everyday "Não" in
order to give green

2012/5/2 Rajan_Verma <rajanverma1...@gmail.com>

Did you attached Wrong file ? 

 

 

Regards

Rajan verma

+91 7838100659 <tel:%2B91%207838100659>  [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

 

-- 
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

Attachment: Copy of Calendarupdate.xlsx
Description: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

Reply via email to