How to know if a cell have bg color?

Rixn

Board Regular
Joined
Jun 4, 2005
Messages
119
Office Version
  1. 2021
Platform
  1. Windows
I'm tryiung to find info on how to find out if a cell have a color or not? I hope it can be done with normal formulas, but if I need the VBA support I hope you can explain a bit more since I'm not so good at that (where to put the script, and so on).

Deeper decription:
I have a range of cells, D5:M10.
Most cells have numbers.
Some of those have been marked with a background color (yellow).
I want to be able to find out which cells have been marked with the color?

Hope someone can help me!
I did find something here when I searched, but that was not exactly what I needed and the solution was in VBA and too high level for me.
/Lars
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
How have those cells been coloured? By normal formatting, or conditional formatting?
 
Upvote 0
OK, that could be done by using an defined name to get the information. What do you want to do with the information when you have it? Are you going to have cells elsewhere to contain flags representing this? Or some other purpose?
 
Upvote 0
As long as I can get the Yes or No for if each cell is colored, I'm happy.
Then I will compare that with another set of cells to see if the hits match.
 
Upvote 0
OK, let assume you are going to have the Yes or No in cells N5 to W10 ( i.e. 10 cells to the right of the area you are testing ), select cell N5, then define a name ( Insert/Name/Define or Formulas/Define Name ) of HasColCellTenToLeft, with a definition of :
Code:
=GET.CELL(63,INDIRECT("RC[-10]",FALSE))
Then type as a formula in cell N5 this:
Code:
=HasColCellTenToLeft>0
and copy to the other cells in the area N5:W10.

You will now have a block of TRUEs and FALSEs where the TRUEs represent the cells in block D5:M10 that have cell color fill.
 
Upvote 0

Forum statistics

Threads
1,215,007
Messages
6,122,670
Members
449,091
Latest member
peppernaut

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top