Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 47
Default color coding

Here I present you the code to validate the content of a cell (check if it is
null) and change the cell color accordingly if the value in the cell is blank.

Please follow following steps
1.Click toolmacro from the menu bar
2.In the macro dialog box, give a name of a macro and click create
3.From the project explorer, double click on sheet1
4.From the drop down list to the left select Worksheet and paste following
codes
#
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Value = "" Then
Target.Interior.Color = vbRed
End If
End Sub
#

Hope this works for you

Have a nice time€¦.


Chris
------
Convert your Excel spreadsheet into an online calculator.
http://www.spreadsheetconverter.com

--
Message posted via http://www.officekb.com

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
color coding JB Excel Discussion (Misc queries) 0 February 8th 09 06:47 AM
color coding Chris Excel Discussion (Misc queries) 2 May 9th 07 06:43 PM
Color coding cells Angela Excel Discussion (Misc queries) 2 September 27th 06 09:20 PM
color coding Ardilla Excel Worksheet Functions 1 January 11th 06 08:49 PM
Color coding tnlovesme Excel Discussion (Misc queries) 1 May 4th 05 01:39 PM


All times are GMT +1. The time now is 06:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"