JenniferMurphy
Well-known Member
- Joined
- Jul 23, 2011
- Messages
- 2,535
- Office Version
- 365
- Platform
- Windows
I cannot find a worksheet function to convert RGB values to their hexadecimal equivalents. Is that correct or did I miss something?
So I wrote this little UDF:
Is there something better?
So I wrote this little UDF:
VBA Code:
Function RGB2Hex(R As Long, G As Long, B As Long) As Variant
RGB2Hex = Application.WorksheetFunction.Dec2Hex(R) _
& Application.WorksheetFunction.Dec2Hex(G) _
& Application.WorksheetFunction.Dec2Hex(B)
End Function
Is there something better?