Hi
I got this code off here and it works really well on my home pc which is using widows 2000 however i need it for work and they are using windows 97.
I get an error with the code in red
I have attached the sheets this refers to, and when i run the code it deletes the dates it matches up with in the master rota sheet which it shouldn't
Sub ExportIt()
Workbooks.Open (ThisWorkbook.Path & "\master rota.xls")
Set outsh = Sheets(ThisWorkbook.Sheets("rota").Range("B4").Value)
ThisWorkbook.Activate
For Each ce In Range("G6:G50")
If Not IsEmpty(ce) Then
Set findit = outsh.Range("G:G").Find(what:=ce.Value)
For j = 8 To Cells(2, Columns.Count).End(xlToLeft).Column
outcol = Evaluate("=SUMPRODUCT(('[Master Rota.xls]" & outsh.Name & "'!$2:$2=" & Cells(2, j).Address & ")*('[Master Rota.xls]" & outsh.Name & "'!$3:$3=" & Cells(3, j).Address & ")*COLUMN('[Master Rota.xls]" & outsh.Name & "'!$2:$2))")
outsh.Cells(findit.Row, outcol).Value = Cells(ce.Row, j).Value
Next j
End If
Next ce
End Sub
Hope someone can help
Dave
Bookmarks