How to code CMYK numbers into an Excel VBA procedure

I have CMYK numbers to use in an excel worksheet.
How can I code CMYK numbers into range("a1").font.color?
Who is Participating?
Neil FlemingConnect With a Mentor Independent consultantCommented:
Code below performs an approximate conversion of CMYK to RGB. It's not perfect though. See original discussion (where I found this) at

Function CYMK2RGB(c As Integer, y As Integer, m As Integer, k As Integer) As Long
Dim R As Integer
Dim G As Integer
Dim B As Integer
Dim colors As Integer

colors = 255 * (100 - k) / 100
R = colors * (100 - c) / 100
G = colors * (100 - m) / 100
B = colors * (100 - y) / 100

End Function

Open in new window

brothertruffle880Author Commented:
Thanks Neil!!!!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.