Dear All,
I am new to VBA programming but basically what I'm trying to do is select the last 10 entries from a specified column. The problem I have is that the code works for data that I have entered manually, but where data is derived from a formula, it is returning the wrong data set. The coding I'm using is as follows:
Sub Last_10()
'
' Last_10 Macro
'
Dim LR As Long
LR = ActiveSheet.Range("A" & Rows.Count).End(xlUp).Row
ActiveSheet.Range("A" & (LR - 9) & ":A" & LR).Copy Destination:=ActiveSheet.Range("x7")
LR = ActiveSheet.Range("l" & Rows.Count).End(xlUp).Row
ActiveSheet.Range("l" & (LR - 9) & ":l" & LR).Copy Destination:=ActiveSheet.Range("y7")
Range("A1:A1").Select
'
End Sub
Column I is the column where data is derived from a formula, column A is just date entries.
Any help will be very much appreciated
Bookmarks