Is there any way to highlight the first two rows automatically after applying filters in a worksheet?

wormaji

New Member
Joined
Sep 27, 2018
Messages
22
is there any way that I can coloured the first two rows in a worksheet automatically after applying the filters?This is the overall problem :I have got a sheet with columns like thisitem price criteria1 criteria2I have to frequently filter and note down the price of the first two rows of the item is criteria1 is satisfied ie. it has Yes in front of it and criteria2 is not satisified i.e. it has no in front of it. Similarly, I have to note down the price of the first row of the item when criteria 2 is satisfied that is, it has Yes in front of it and criteria. One is not satisfied that is, it has in front of it.I sometimes end up taking the price of the second and third row instead of the first row. It has to do with my vision disability and I was thinking that if I can highlight the first two rows, then hopefully I won't make mistakes.in summary, we just want the first two rows to be highlighted . Even if the increase keep on changing after applying different filters.Thank you for any inputs
 

Some videos you may like

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
42,880
Office Version
365
Platform
Windows
Open the name manager > New > Enter a name (I've called it visible) > in the refers to box enter =GET.CELL(17,INDIRECT("rc",FALSE)) > OK > Close
Then in an unused column on your sheet starting with the first row of data enter =Visible (change to the name you have used) & fill down.
Select your data (excluding any headers) and In conditional formatting enter this formula
=COUNTIF($AF$2:$AF2,">0")<=2
(change column & start row to suit)
Select format colour & give it a go

PS the workbook will need to be saved as a macro enabled workbook
 
Last edited:

Watch MrExcel Video

Forum statistics

Threads
1,102,733
Messages
5,488,551
Members
407,646
Latest member
utl1095

This Week's Hot Topics

  • Timer in VBA - Stop, Start, Pause and Reset
    [CODE=vba][/CODE] Option Explicit Dim CmdStop As Boolean Dim Paused As Boolean Dim Start Dim TimerValue As Date Dim pausedTime As Date Sub...
  • how to updates multiple rows in muliselect listbox
    Hello everyone. I need help with below code. code is only chaning 1st row in mulitiselect list box. i know issue with code...
  • Delete Row from Table
    I am trying to delete a row from a table using VBA using a named range to find what I need to delete. My Range is finding the right cell. In the...
  • Assigning to a variable
    I have a for each block where I want to assign the value in column 5 of the found row to the variable Serv. [CODE=vba] For Each ws In...
  • Way to verify information
    Hi All, I don't know what to call this formula, and therefore can't search. I have a spreadsheet with information I want to reference...
  • Active Cell Address – Inactive Sheet
    How to use VBA to get the cell address of the active cell in an inactive worksheet and then place that cell address in a location on the current...
Top