ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Finding cells based on the colour of the text (https://www.excelbanter.com/excel-worksheet-functions/454871-finding-cells-based-colour-text.html)

Jacob Cooke-TIlley

Finding cells based on the colour of the text
 
Hi Crew

Posting this one as Im not sure how to approach it. My sheet is broken up in production facilities as the heading and product lines (Multiple in each location). When I run it off the main company system It makes the production lines with faults go red, but there are two thousand of them and only 20-30 of them are listed in red text. Is there anyway I can Query or create a filter which just shows the ones with red text?

Auric__

Finding cells based on the colour of the text
 
Jacob Cooke-TIlley wrote:

Posting this one as Im not sure how to approach it. My sheet is broken
up in production facilities as the heading and product lines (Multiple
in each location). When I run it off the main company system It makes
the production lines with faults go red, but there are two thousand of
them and only 20-30 of them are listed in red text. Is there anyway I
can Query or create a filter which just shows the ones with red text?


Recent versions of Excel can filter by color. Add a filter, then filter by
color.

If you can't, for whatever reason, you can use VBA to hide the rows that are
black, using the cells' .Font.Color property:

Sub findRed()
Const col = 1
Const start = 2
Dim ro As Long
For ro = start To start + 2000
If Cells(ro, col).Font.Color = vbBlack Then
Cells(ro, col).EntireRow.Hidden = True
End If
Next ro
End Sub

Change "col" to the column number of the first cell (e.g. 1 instead of A),
"start" to the number of the first row, and (optionally) "start + 2000" to
the number of the last row.

--
If you're good at something, never do it for free.


All times are GMT +1. The time now is 12:03 AM.

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