GetColourHex (Public)

PHOTO EMBED

Wed Sep 08 2021 04:26:33 GMT+0000 (UTC)

Saved by @Darkleech #vba

Sub GetColourHex()

Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Dim str0 As String, str As String
Dim cel As Range
For Each cel In Selection
str0 = Right("000000" & Hex(cel.Interior.Color), 6)
str = Right(str0, 2) & Mid(str0, 3, 2) & Left(str0, 2)
cel = "#" & str & ""
Next cel
done:
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
content_copyCOPY