How to make cell change color at specific frequency?

Randomizer

New Member
Joined
Jan 20, 2017
Messages
3
Hello guys,
Screenshot excel - http://scr.hu/1tm/4xsbo
So my B1 is a hyperlink to tab 'Sheet1'. So every time I click B1 the tab "refreshes".
I want the colors of A1 and A2 change every time when I go to this tab.
Let's say I want:
A1 to be Red 20% of the time, Yellow 40% of the time and Blue 40% of the time.
A2 to be Red 10% of the time, Yellow 70% of the time and Blue 20% of the time.

How can I do that? If you will give me a code, could you please explain me how to implement it in the cells? I am novice excel user.

Thank you very much!
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Upvote 0
Thanks for posting the links to the other threads. Please do so in future should you cross-post here again.
 
Upvote 0

Forum statistics

Threads
1,215,029
Messages
6,122,760
Members
449,095
Latest member
m_smith_solihull

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