ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Set color of data in unprotected cells to blue (https://www.excelbanter.com/excel-programming/346896-set-color-data-unprotected-cells-blue.html)

mikeburg[_50_]

Set color of data in unprotected cells to blue
 

Need simplest VBA that sets the color of data entered in an unprotecte
cell to blue & resets it back to automatic (black) when & if a cell i
protected again.

The data may or may not be already entered. Therefore, the chang
should take place when a cell is either unprotected or protected (no
when sheet protection is turned on or off).

I prefer not having to put the VBA code in every worksheet but have i
for all workbooks & worksheets.

Any ideas?

Thanks so much for your help. mikebur

--
mikebur
-----------------------------------------------------------------------
mikeburg's Profile: http://www.excelforum.com/member.php...fo&userid=2458
View this thread: http://www.excelforum.com/showthread.php?threadid=48927


Dave Peterson

Set color of data in unprotected cells to blue
 
Can you use format|conditional formatting?

If yes...

Select A1
then select all the cells (A1 will be the active cell)
format|conditional formatting
formula is: =CELL("Protect",A1)=0
Choose the format you like for unlocked cells.





mikeburg wrote:

Need simplest VBA that sets the color of data entered in an unprotected
cell to blue & resets it back to automatic (black) when & if a cell is
protected again.

The data may or may not be already entered. Therefore, the change
should take place when a cell is either unprotected or protected (not
when sheet protection is turned on or off).

I prefer not having to put the VBA code in every worksheet but have it
for all workbooks & worksheets.

Any ideas?

Thanks so much for your help. mikeburg

--
mikeburg
------------------------------------------------------------------------
mikeburg's Profile: http://www.excelforum.com/member.php...o&userid=24581
View this thread: http://www.excelforum.com/showthread...hreadid=489272


--

Dave Peterson

mikeburg[_51_]

Set color of data in unprotected cells to blue
 

Thanks. Conditional formatting helps.

I was hoping for something more automatic.

Also, we are constantly changing cells from protect to unprotect & visa
versa. I really need something more automatic when that is done.

Any other ideas? Thanks so very much. mikeburg


--
mikeburg
------------------------------------------------------------------------
mikeburg's Profile: http://www.excelforum.com/member.php...o&userid=24581
View this thread: http://www.excelforum.com/showthread...hreadid=489272


Dave Peterson

Set color of data in unprotected cells to blue
 
I can't think of anything more automatic than conditional formatting.

mikeburg wrote:

Thanks. Conditional formatting helps.

I was hoping for something more automatic.

Also, we are constantly changing cells from protect to unprotect & visa
versa. I really need something more automatic when that is done.

Any other ideas? Thanks so very much. mikeburg

--
mikeburg
------------------------------------------------------------------------
mikeburg's Profile: http://www.excelforum.com/member.php...o&userid=24581
View this thread: http://www.excelforum.com/showthread...hreadid=489272


--

Dave Peterson

mikeburg[_52_]

Set color of data in unprotected cells to blue
 

Thank you for your help. mikeburg


--
mikeburg
------------------------------------------------------------------------
mikeburg's Profile: http://www.excelforum.com/member.php...o&userid=24581
View this thread: http://www.excelforum.com/showthread...hreadid=489272



All times are GMT +1. The time now is 03:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com