![]() |
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 |
All times are GMT +1. The time now is 11:39 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com