View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
brad brad is offline
external usenet poster
 
Posts: 32
Default If Statement help

In the "what" argument of the Find method include an array
of the values you want to search for. It will find the
first instance. You could also include a range of cells.

For example:
If Range("a:a").Find(What:=Array
("DDC", "DDCE", "DEV"...and so on)) is Nothing Then

HTH.

-Brad
-----Original 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/

.