Dan, you can get it yo work in Excel 2010 or above. There is a property
they introduced which will help to identity the actual interior color or
the color rendered by conditional format.

Regards
Sam
On 7 Aug 2014 06:57, "Daniel Parmet" <danielpar...@gmail.com> wrote:

> I have a macro (first I've ever written!) that works wonderfully with
> cells that have not been conditionally formatted:
>
> I need help with:
>
> Function CheckColor(range)
> 'Returns Opportunity Words on deal score value.
>       If range.Interior.Color = RGB(198, 239, 206) Then
>         CheckColor = "Opportunity is Green"
>         'MsgBox "Opportunity is Green"
>         'Text Color = RGB(0, 97, 0)
>     ElseIf range.Interior.Color = RGB(255, 235, 156) Then
>         CheckColor = "Opportunity is Yellow"
>         'MsgBox "Opportunity is Yellow"
>         'Text Color = RGB(156, 101, 0)
>     ElseIf range.Interior.Color = RGB(255, 199, 206) Then
>         CheckColor = "Opportunity is Red"
>        ' MsgBox "Opportunity is Red"
>         'Text Color = RGB(156, 0, 6)
>     Else
>         CheckColor = "Error"
>         'Text Color = RGB(0, 0, 0)
>     End If
> End Function
>
> 1) The text returned by macro to be a different font color (not sure how).
> 2) This macro to work with conditional formatting.
>
>
>
> I found this website on the conditional formatting issue (
> http://www.cpearson.com/Excel/CFColors.htm) but was still unsure how to
> make it work with my code. I read through his code and it makes sense. For
> the conditional formatting value, it returns 35, 36, and 38. Though, those
> numbers did not work in my macro.
>
>
>
>
>  --
> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
> https://www.facebook.com/discussexcel
>
> FORUM RULES
>
> 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) Jobs posting is not allowed.
> 6) Sharing copyrighted material and their links is not allowed.
>
> NOTE : Don't ever post confidential data in a workbook. Forum owners and
> members are not responsible for any loss.
> ---
> You received this message because you are subscribed to the Google Groups
> "MS EXCEL AND VBA MACROS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to excel-macros+unsubscr...@googlegroups.com.
> To post to this group, send email to excel-macros@googlegroups.com.
> Visit this group at http://groups.google.com/group/excel-macros.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

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) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.

Reply via email to