View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default If Then macro with text

Try this simple macro
Sub getinfofromshts()
For i = 2 To 3
sh = Sheets(i).Name
With Sheets(1)
For Each c In Sheets(sh).Range("a1:a8")
lr = .Cells(Rows.Count, 1).End(xlUp).Row + 1
If Not IsNumeric(c) Then c.Copy .Cells(lr, 1)
Next c
End With
Next i
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"kevin026" wrote in message
...
Hi,

I need help with code that will search a list for cells with text in A1:A5
in sheet 2 and 3, and any text that exists will be listed in a column in
sheet 1.

what should I do?

thanks!