View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Otto Moehrbach[_2_] Otto Moehrbach[_2_] is offline
external usenet poster
 
Posts: 1,071
Default IF a condition is met

Is the word "high" found in a specific column of every sheet or can it be in
any column in every sheet? Can the word be found more than once in any one
row? Are there any sheets that you DON'T want searched, like for instance,
the Summary sheet? What columns comprise the "entire record"? Where in the
Summary sheet do you want the data placed? HTH Otto
"Loc" wrote in message
...
Hello SA,

Thank you for your help. It seems like a programming not just a simple
formula as I expected. I have 2 questions for you:

1) Where do I write this program for the workbook I have?
2) How do I program the workbook to search entire book not just sheet and
copy the entire records containing word "high" to the "Summary" worksheet?

If you don't mind, please show me step-by-step how to make this process
work

Loc

"StumpedAgain" wrote:

How about something like this:

Option Explicit
Sub Select_Aged()

Dim i As Long
Dim cell As Range
i = 0

Set ActiveSheet = C_Sheet

Sheets.Add
Activesheet.Name = "Summary"

C_Sheet.Select

For Each cell In ActiveSheet.UsedRange
If cell Like "*high*" Or Then
cell.EntireRow.Copy Destination:=Sheets("Summary").Range("A1").Offset( i,
0)
i = i + 1
End If
Next cell

End Sub

Hope this helps!
--
-SA


"Loc" wrote:

I have a workbook comprised of several worksheets. I need to print any
row
with a word "high" in any worksheet to a new worksheet of all records
containing word "high" only. Please help!