Sub CheckValue()
varr = Array("DDC", _
"DDCE", _
"DEV", _
"DTS", _
"EXT", _
"PUP", _
"RIC", _
"RIP", _
"STD")
Dim rngCol as Range
Dim rng As Range, rng1 As Range
Set rng1 = Nothing
set rngCol = Range(Cells(1,1),Cells(rows.count,1).End(xlup))
For i = LBound(varr) To UBound(varr)
Set rng = rngCol.Find(what:=varr(i))
If Not rng Is Nothing Then
Set rng1 = rng
Exit For
End If
Next
If rng1 Is Nothing Then
Range("a16").EntireRow.Insert shift:=xlDown
End If
End Sub
--
Regards,
Tom Ogilvy
"alexm999 " wrote in message
...
I have an IF statement:
If Range("a:a").Find(what:="DEV") Is Nothing Then
Range("a16").EntireRow.Insert shift:=xlDown
End If
Now i found out that I have more words to find in column A.
Here's what I need to look for:
DDC
DDCE
DEV
DTS
EXT
PUP
RIC
RIP
STD
Is there a way I can incoporate all these into 1 IF statement ?
Anyone have a bit of code to help? By the way, the above order is how
it's generated in the file.
---
Message posted from http://www.ExcelForum.com/