Hi I am using HEX() to indicate the color of specific cells in excel. I did 4 examples and results given are confusing. 2 of 4 gave 6-digits HEX code and the other 2 gave 4-digits HEX code. I did a search online and seems like HEX code has to be 6-digits? So what do these 4-digits code stand for?
I also put these 4-digits code in https://www.color-hex.com/ and no results were found.
Sub showcolor()
Debug.Print Hex(ThisWorkbook.Worksheets(ThisWorkbook.Worksheets.Count).Cells(10, "AB").Interior.Color)
Debug.Print Hex(ThisWorkbook.Worksheets(ThisWorkbook.Worksheets.Count).Cells(34, "AB").Interior.Color)
Debug.Print Hex(ThisWorkbook.Worksheets(ThisWorkbook.Worksheets.Count).Cells(13, "AB").Interior.Color)
Debug.Print Hex(ThisWorkbook.Worksheets(ThisWorkbook.Worksheets.Count).Cells(12, "AB").Interior.Color)
End Sub
The results given are
C0FF FFFF F0B000 FFFFFF