ADVERTISEMENT
Sub MatchCopyPaste100()
Dim LR As Long, i As Long, ws As Worksheet
Application.ScreenUpdating = False
With Sheets("JDE") 'NB. This does not select JDE
LR = .UsedRange.Find(What:="*", SearchDirection:=xlPrevious, SearchOrder:=xlByRows).Row 'define LR
.Range("AC4:AC" & LR).FormulaR1C1 = "=TEXT(RC[-23],""mm"")&""-""&TEXT(RC[-23],""yy"")" 'Change date format
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)"
End With
End Sub
ADVERTISEMENT
Sub MatchCopyPaste100()
Dim LR As Long, i As Long, ws As Worksheet
Application.ScreenUpdating = False
With Sheets("JDE") 'NB. This does not select JDE
LR = .UsedRange.Find(What:="*", SearchDirection:=xlPrevious, SearchOrder:=xlByRows).Row 'define LR
.Range("AC4:AC" & LR).FormulaR1C1 = "=TEXT(RC[-23],""mm"")&""-""&TEXT(RC[-23],""yy"")" 'Change date format Col AC
With .Range("Ab4:Ab" & LR)
.FormulaR1C1 = "=IF(RC[-24]>0,RC[-25]&"".""&RC[-24],RC[-25])" 'Combine two columns (GL acct and Obj acct)
.Value = .Value
End With
.Range("Ad4:Ad" & LR).FormulaR1C1 = "=VLOOKUP(RC[-2],Index!C[-29]:C[-26],3,FALSE)" 'Col AD =type
.Range("Ae4:Ae" & LR).FormulaR1C1 = "=IF(RC[-3]>39999,""P&L"",""Balance-Sheet"")"
End With
End Sub