is this anway closer
or whats the best way to go bout it
Dim wsMaster As Worksheet, wbDATA As Workbook
Dim NextRow As Long, LastRow As Long
Set wsMaster = ThisWorkbook.Sheets("allocation")
NextRow = wsMaster.Range("A" & Rows.Count).End(xlUp).Row + 1
Set wbDATA = Workbooks.Open("C:\Users\rr154237\Desktop\\UBS_FND_OngoingCharge_Calc.xlsx")
With wbDATA.Sheets("allocation")
LR = .Cells.Find("*", , , , xlByRows, xlPrevious).Row
For i = 1 To LR
If IsDate(.Cells(i, 1)) Then
.Cells(i, 1).Copy
wsMaster.Range("A" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
End If
If Len(.Cells(i, "AD")) And .Cells(i, "AD") = "FUND OWNERSHIP %" Then
.Cells(i, "AD").Offset(1).Resize(4).Copy
wbDATA.Range("B" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial Transpose:=True
End If
Next i
End With
Application.CutCopyMode = 0
Columns(1).NumberFormat = "dd/mm/yyyy"
Application.ScreenUpdating = True
'wbDATA.Close False
End Sub
i want to cpoy certain data from the spreadsheet the marco is in to\UBS_FND_OngoingCharge_Calc.xlsx
Bookmarks