View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Simon Lloyd[_947_] Simon Lloyd[_947_] is offline
external usenet poster
 
Posts: 1
Default Transferring specific data



Jennifer, did this code not work for you?

Sub Move_data()
Dim rng As Range, MyCell As Range
Dim Mybook As String
Dim wbNew As Workbook
Set wbNew = Workbooks.Add()
Mybook = ThisWorkbook.Name
Workbooks(Mybook).Activate
Set rng = Range("B1:B" & Range("B" & Rows.Count).End(xlUp).Row)
For Each MyCell In rng
If MyCell.Value = "01/01/2008" And MyCell.Offset(0, 25).Value = "Yes"
_
And MyCell.Offset(0, 78).Value = "Closed" Or MyCell.Offset(0, 78).Value
= "Closed - No Action" Then
MyCell.EntireRow.Copy Destination:=wbNew.Sheets("Sheet1").Range("A" &
Rows.Count).End(xlUp).Offset(1, 0)
End If
Next MyCell
wbNew.SaveAs Filename:="Your path and name"
End Sub


--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=38552