Thread: Selective paste
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
StumpedAgain StumpedAgain is offline
external usenet poster
 
Posts: 192
Default Selective paste

I'm sorry, that didn't make any sense. Are you wanting code where either
'aged' or 'independent' is found? If not, let me know. If so, try this:

Option Explicit
Sub Select_Aged()

Dim i As Long
Dim cell As Range
i = 0

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

End Sub
--
-SA


"ramesh" wrote:


Please let us the code that would allow us to select combination of
rows/columns in which the word 'aged' or "independent" is found and
then to paste them into a new sheet with row/columnwise data also ?


ramesh

*** Sent via Developersdex http://www.developersdex.com ***