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
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
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:
Upvote 0

Forum statistics

Threads
1,224,813
Messages
6,181,118
Members
453,021
Latest member
Justyna P

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