I'm trying to copy the range of (Column A4 to Last used cell within that column) to another column (starting at AM4) but can't get it to work
Anything else work with the commands below besides the commands in RED
Sub MatchCopyPaste100()
Dim LR As Long, i As Long, ws As Worksheet
Application.ScreenUpdating = False
With Sheets("JDE")
LR = .UsedRange.Find(What:="*", SearchDirection:=xlPrevious, SearchOrder:=xlByRows).Row
.Range("AC4:AC" & LR).FormulaR1C1 = "=TEXT(RC[-23],""mm"")&""-""&TEXT(RC[-23],""yy"")"
With .Range("Ab4:Ab" & LR)
.FormulaR1C1 = "=IF(RC[-24]>0,RC[-25]&"".""&RC[-24],RC[-25])"
.Value = .Value
End With
.Range("Ad4:Ad" & LR).FormulaR1C1 = "=VLOOKUP(RC[-2],Index!C[-29]:C[-26],3,FALSE)"
.Range("Ae4:Ae" & LR).FormulaR1C1 = "=IF(RC[-3]>39999,""P&L"",""Balance-Sheet"")"
.Range("Aa4:Aa" & LR).FormulaR1C1 = "=VLOOKUP(RC[1],Index!C[-26]:C[-25],2,FALSE)"
Range("AB4:AB").CurrentRegion.Copy
Range("AM4:AM" & LR).PasteSpecial
End With
End Sub
Anything else work with the commands below besides the commands in RED
Sub MatchCopyPaste100()
Dim LR As Long, i As Long, ws As Worksheet
Application.ScreenUpdating = False
With Sheets("JDE")
LR = .UsedRange.Find(What:="*", SearchDirection:=xlPrevious, SearchOrder:=xlByRows).Row
.Range("AC4:AC" & LR).FormulaR1C1 = "=TEXT(RC[-23],""mm"")&""-""&TEXT(RC[-23],""yy"")"
With .Range("Ab4:Ab" & LR)
.FormulaR1C1 = "=IF(RC[-24]>0,RC[-25]&"".""&RC[-24],RC[-25])"
.Value = .Value
End With
.Range("Ad4:Ad" & LR).FormulaR1C1 = "=VLOOKUP(RC[-2],Index!C[-29]:C[-26],3,FALSE)"
.Range("Ae4:Ae" & LR).FormulaR1C1 = "=IF(RC[-3]>39999,""P&L"",""Balance-Sheet"")"
.Range("Aa4:Aa" & LR).FormulaR1C1 = "=VLOOKUP(RC[1],Index!C[-26]:C[-25],2,FALSE)"
Range("AB4:AB").CurrentRegion.Copy
Range("AM4:AM" & LR).PasteSpecial
End With
End Sub