Thread: Missing Headers
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dow Dow is offline
external usenet poster
 
Posts: 31
Default Missing Headers


I have a list of 35 words and phrases that may appear as headers in my
spreadsheet. They do not always appear though.

I would like to write a script that will find the ones missing and add
them.

I found this, but it only works one at a time:

Dim XLCell As Range

Set XLCell = Sheets("Test").Range("1:1").Find("Acknowledge", ,
xlValues,
xlWhole)
If XLCell Is Nothing Then Sheets("Test").Range
("B1").EntireColumn.Insert
Sheets("Test").Range("B1").Value = "Acknowledge"

I thought of using an Array to help but I have not had any luck with
the script.

Does anyone out there have some suggestions?

Thank you again for all the help,

Dow. MH