Dynamic Conditional formatting with a scroll bar

Mattyastill

New Member
Joined
Nov 27, 2017
Messages
23
gwYAb

Hi,


Im currently trying to apply conditional formatting to a table of data that changes via a scroll bar, the data ranges from years 2007-2016 consisting of Q1-Q-4.

The scroll bar i have also ranges from the same years. I would like the conditional formatting to highlight the highest and lowest values for each each depending on the value of the scroll bar.

So if the user has selected 2007 then the highest and lowest values from Q1-Q4 for the year will be highest green and red respectively.

I tried nested if statements but nothing seemed to happen and my code wouldn't save.

https://imgur.com/a/gwYAb This is the table i am trying to applying the formatting to.


https://imgur.com/a/jjwKV This is the dashboard i am creating and want to replace the graph is the bottom right with the above table.


Any help would be much appreciated as i am unable to move on with my project till this is solved.

Thanks and looking forward to hearing from you.
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Welcome to Mr Excel

Maybe something like this

Select G13:J22

Rule 1 (highlight min)
Home > Conditional Formatting > New Rule > Use a formula to determine which cells to format
insert this formula
=AND($F13=$B$9,G13=MIN(INDEX($G$13:$J$22,MATCH($B$9,$F$13:$F$22,0),0)))
pick the format you want (Fill --> light red, for example)

Rule 2 (highlight Max)
Home > Conditional Formatting > New Rule > Use a formula to determine which cells to format
insert this formula
=AND($F13=$B$9,G13=MAX(INDEX($G$13:$J$22,MATCH($B$9,$F$13:$F$22,0),0)))
pick the format you want (Fill --> light green, for example)

Hope this helps

M.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
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