ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   use find to find fill? (https://www.excelbanter.com/excel-programming/439274-use-find-find-fill.html)

John[_19_]

use find to find fill?
 
Want to find cells with certain fill colors in a range. VBA. Excel 2007.
I can't even use Find & Select to do it. All I get is "Preview" in the
format space and it can't find anything. Even with identifying the cells
contents. Like find 25 with fill color red.

I do "find" 25 format fill red and nothing happens.

Then I try choosing the format from the cell. Same thing. It can't find it.

I was hoping to record it in a mcro and learn from it. Nothing works.

John


Rick Rothstein

use find to find fill?
 
How did the red color get in the cell... manually colored or conditionally
formatted?

--
Rick (MVP - Excel)


"John" wrote in message
...
Want to find cells with certain fill colors in a range. VBA. Excel 2007. I
can't even use Find & Select to do it. All I get is "Preview" in the
format space and it can't find anything. Even with identifying the cells
contents. Like find 25 with fill color red.

I do "find" 25 format fill red and nothing happens.

Then I try choosing the format from the cell. Same thing. It can't find
it.

I was hoping to record it in a mcro and learn from it. Nothing works.

John



John[_19_]

use find to find fill?
 
In a macro

MyCell.Interior.ColorIndex = one of Red, Blue, Yellow, Cleared
Red = 3: Blue = 5: Yellow = 6: Green = 4: Cleared = -4142
MyCell as range.

Don't remember where I got those numbers for the colors. Seem to come up
with pretty much the correct color.

John







Rick Rothstein wrote:
How did the red color get in the cell... manually colored or
conditionally formatted?



All times are GMT +1. The time now is 10:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com