Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional formating 1

Status
Not open for further replies.

coltaalex

Technical User
Jul 2, 2010
61
US
I have two columns, with text codes,
the codes in in the first column are not changing,
in the second column value are permanent changing,
so i need to use conditional formatting to do : when introducing values in the second column and these values don't exist in the first column, to make these cells ( in the second column) red
 
Let's say your first column is D10:D13 and 2nd column is E10:E13

For cell E10, apply formatting as follows:
Format / ConditionalFormatting / FormulaIs...
=ISNA(MATCH(E10,$D$10:$D$13,0))
And select format like red
Press ok

Use format painter to copy the format into remainder of the cells in column E
 
now how to make a message bob to appear when i have red cells
 
i tried this :

Sub color2()
Dim N As Long
For N = 1 To 56
If Cells(N, 8).Interior.ColorIndex = 3 Then
MsgBox "Codes don't Exist "
Exit For
Else

End If
Next N
end sub


it's not working with conditional formatting
 


Hi,

This can be done with native Excel Conditionla Formatting. You do not need VBA code, just a formula in the CF.

You can get the COUNT of those that do not exist also using a COUNTIF function.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
hi Skip how about the message box, when the conditional formula is true
 



How incredibly dumb! Why not a value in a cell? I get extremely annoyed clicking message buttons, when other less intrusive methods exist!!!

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
sorry Skip i didn't understand your last message,
my first language is not English
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top