How can I find out the cell background color in Excel?

Here is what I am trying to do:

1 Select the cell. enter image description here

2 Click on the bucket. enter image description here

3 Click on the More Colors... enter image description here

4 Hoping to see the cell background color somewhere here. enter image description here

Is it impossible to find out the background color in Excel? Preferable I need a hexadecimal representation of the color.


Using the code provided in comments does not work Debug.Print Hex(Range("A1").Interior.Color): enter image description here

  • Something like Debug.Print Hex(Range("A1").Interior.Color)? May 25, 2022 at 14:49
  • No idea why your dialog box is showing black when you have the yellow cell selected though. May 25, 2022 at 14:55
  • @DarrenBartrup-Cook, where should I put the code in? May 25, 2022 at 15:12
  • 3
    It's VBA code ("Developer tab -> Visual Basic). The method you outline should give you the fill colour of your cell. Are you sure you don't have any conditional formatting? May 25, 2022 at 15:48
  • MsgBox Selection.Interior.ColorIndex
    – Lee
    May 26, 2022 at 9:11

1 Answer 1


Using a custom name get.cell function is a good approach. Seven background colors are set in cells A1:A7: red, orange, yellow, green, blue, blue and purple.

  1. First, select column A, and press Ctrl+F3 to create a new name. Name You can enter a name arbitrarily, such as example Name: Background color
  2. Reference position input formula: =get.cell(63,Sheet2!$A1) (Sheet2!A1 is the A1 cell of the current worksheet, which needs to be filled in according to the actual situation)
  3. Click OK to finish creating the new name. Enter the formula in cell B1 = background color, that is, A1:A7 corresponds to the cell background color number.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .