Color cells according to its nature

YZ1675

New Member
Joined
Feb 6, 2022
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Dear all,
Happy to join mrexcel !

I have an brain teaser with VBA. I want to create a macro that will color:
- Hard coded cells in blue police.
- Formula (ex: vlookup): In black police.
- Linked cells (ex: =Sheet1!$B$5): In green police.

Do you have a code that could work out ?

Many thanks in advance.
 

Attachments

  • CaptureExcel.PNG
    CaptureExcel.PNG
    2.7 KB · Views: 15

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
select all cells of your worksheet or in a range
F5>Special>Constants>OK
right mouse Format>textcolor>blue

same for the formulas, but the difference between both ?
 
Upvote 0
Thanks for you reply !

Actually, I would like to automate the program to do it with a multisheets excel without doing it for all sheets.

The difference is just that I want to have a specific color for formulas with the sheet that I use (in Black) and another specific color for formulas that are linked with other sheets.

Best,
 
Upvote 0
automate ?? Tuff !!!
You can program something in VBA and run that once in a while
 
Upvote 0
Allright !

And do you know how to select only constant with a number please ?
 
Upvote 0

Forum statistics

Threads
1,223,884
Messages
6,175,174
Members
452,615
Latest member
bogeys2birdies

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