Click to change the cell colour in Excel. Double click on the cell to turn it red. Right click on the cell to turn it green.
Check out my online courses
code
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Cancel = True
Target.Interior.ColorIndex = 3
End Sub
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
Cancel = True
Target.Interior.ColorIndex = 4
End Sub
For more help visit my website or email me at easyexcelanswers@gmail.com.
Contact me regarding customizing this template for your needs.
Excel one-on-one on-line training available. Email me to arrange.
I am able to provide online help on your computer at a reasonable rate.
Check out my next one-hour Excel Webinar
I use a Blue condensor Microphone to record my videos, here is the link
Check out Crowdcast for creating your webinars
If you need to buy Office 2019 follow
I use Tube Buddy to help promote my videos
Check them out
Follow me on Facebook
Follow me on twitter
easyexcelanswers
IG @barbhendersonconsulting
You can help and generate a translation to you own language
*this description may contain affiliate links. When you click them, I may receive a small commission at no extra cost to you. I only recommend products and services that I’ve used or have experience with.
Watch more new videos about Excel Office | Synthesized by Mindovermetal English
Just saw this and the changes work well – but I was wondering can I use RGB codes for the colors? Additionally, how could I add it so it will change the font style (i.e. bold), and color of the font all at once? Thanks
Hi Barb thanks for help… but how can i change just text color
Hi Barb, great tip works a treat however, how do I then remove the colour from the sheet if needed? Thanks in advance from Australia.
thank a lot, can we make micro of this please reply,
Thanks for that!
Is it possible to align to code only to specific rows / cells?
For example could I code it that the green colour change on a double click should only apply to the cells E9 to J9 all the way down to E68 to J68?
I paste this code but I get a "Compile error: Invalid ourside procedure". Any ideas welcome. Running Office pro plus 2019
Can use more than 2 colours?
God bless u mam
How to apply this to merged cells too?
hi Barb, thanks for this code.. but how can i use it only for say, colum A or Colum B
That is so AWESOME!!! I have never been able to get any code to work. But this did. Thank you!!!
How do you reset the color of the cell?
Clearest and fastest!
How to change the colour?
Is there a way to create a chart based on how many is red and how many is green?
Great & Easy!! Thank You.
Thanks from Brazil!
How to change the color to normal
After i save and exit and reopen it other time the formula does not work..plz help.
how did you set those toolbar inquire,acrobate,cashbook,item etc and more? how? please we want a videos about that settings