ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Display rows that meet condition (https://www.excelbanter.com/excel-discussion-misc-queries/237529-display-rows-meet-condition.html)

Vic

Display rows that meet condition
 
How can I display only rows with any cells from J thru BX highlighted in red?
I don't want to see other rows since they have no problems.
Row Cells: A-Country, B-Company, C-Product name, D-Product number. Cells E
thru I cannot be red. Any of the cells J thru BX may be hoghlighted in red.
BX is the last cell in the row.
Thank you.

Luke M

Display rows that meet condition
 
As you can't sort/filter on colors, perhaps you can tells us why the cells
are red? Do they meet some criteria, boundary condition, goal, etc?
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Vic" wrote:

How can I display only rows with any cells from J thru BX highlighted in red?
I don't want to see other rows since they have no problems.
Row Cells: A-Country, B-Company, C-Product name, D-Product number. Cells E
thru I cannot be red. Any of the cells J thru BX may be hoghlighted in red.
BX is the last cell in the row.
Thank you.


Jacob Skaria

Display rows that meet condition
 
Hi Vic

Try the below macro which will hide all rows which are not highlighted. By
highligtion i assume you have used 'Fill Color' with (Red)...If you are new
to macros set the Security level to low/medium in (Tools|Macro|Security).
From workbook launch VBE using short-key Alt+F11. From menu 'Insert' a module
and paste the below code. Save. Get back to Workbook. Run macro from
Tools|Macro|Run <selected macro()


Sub HideRows()
Dim lngRow As Long, blnVisible As Boolean
Application.ScreenUpdating = False
For lngRow = 2 To Cells(Rows.Count, "A").End(xlUp).Row
blnVisible = False
For lngCol = 10 To 76
If Cells(lngRow, lngCol).Interior.ColorIndex = 3 Then _
blnVisible = True: Exit For
Next
Rows(lngRow).Hidden = Not blnVisible
Next
Application.ScreenUpdating = True
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Vic" wrote:

How can I display only rows with any cells from J thru BX highlighted in red?
I don't want to see other rows since they have no problems.
Row Cells: A-Country, B-Company, C-Product name, D-Product number. Cells E
thru I cannot be red. Any of the cells J thru BX may be hoghlighted in red.
BX is the last cell in the row.
Thank you.


Vic

Display rows that meet condition
 
Employees are instructed to highlight cells in red if there are issues. It is
not done programmatically. There may be more than one cell in a specific row
highlighted in red. I need rows that have at least one red cell. It is not
important how many red cells are in that row.

"Luke M" wrote:

As you can't sort/filter on colors, perhaps you can tells us why the cells
are red? Do they meet some criteria, boundary condition, goal, etc?
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Vic" wrote:

How can I display only rows with any cells from J thru BX highlighted in red?
I don't want to see other rows since they have no problems.
Row Cells: A-Country, B-Company, C-Product name, D-Product number. Cells E
thru I cannot be red. Any of the cells J thru BX may be hoghlighted in red.
BX is the last cell in the row.
Thank you.



All times are GMT +1. The time now is 02:43 PM.

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