Warning

 

Close
Confirm Action

Are you sure you wish to do this?

Cancel Confirm
AR15.COM
11/9/2012 8:27:30 AM EDT
I have a inventory to keep, and i want to make it automatically highlight that specific cell to turn red when i enter 'N'

How do I do that?
11/9/2012 8:30:30 AM EDT
[#1]
"Conditional Formatting" is what you're looking for.  The exact mouse clicks vary slightly depending on version, but essentially you can tell a cell to be highlighted in red if the value is equal to "N".
11/9/2012 8:31:10 AM EDT
[#2]
Select cell/cells

conditional formatting - highlight cells rule - equal to
11/9/2012 8:39:30 AM EDT
[#3]
many thanks, conditional formatting new rule did it!
11/9/2012 8:40:29 AM EDT
[#4]
Hit Alt+F11. This gives you the VBA editor. From the left, click the sheet you're interested in, then paste the following code:


Private Sub Worksheet_Change(ByVal Target As Range)
   If Target.Column = 2 Then 'Second column, for instance
       Dim Item As Range
       For Each Item In Target.Cells
           Item.Interior.Color = IIf(Item.Value = "N", RGB(255, 0, 0), RGB(0, 255, 0))
       Next
   End If
End Sub


You can use whatever you want for column/rows, but as an example, I selected the second column.