Hi
I am using the below code to assist in creating a journal. It is assigning a Nominal code to use based on certain criteria. The problem I have is that there can be several thousand lines on the spreadsheet and it is proving very time consuming to run.
Is there any alternative code that I can use to speed up the process?
Thanks on Advance.
Sub UpdateTOrigBankAcc()
'
' UpdateTOrigBankAcc Macro
'
'
Application.ScreenUpdating = False
Dim Lastrow As String
Sheets("Transactions Orig").Select
Range("A1").Select
Selection.End(xlDown).Select
Lastrow = ActiveCell.Row
Range("M2").Select
Selection.FormulaArray = _
"=INDEX(Identifier!C[-8],MATCH(1,(Identifier!C[-12]='Transactions Orig'!RC[-12])*(Identifier!C[-11]='Transactions Orig'!RC[-9]),0))"
Range("M3").Select
Selection.Copy
Range("M2:M" & Lastrow).Select
ActiveSheet.Paste
Columns("M:M").Select
Selection.Copy
Range("M1").Select
Selection.PasteSpecial Paste:=xlPasteValues
Application.ScreenUpdating = True
End Sub
I am using the below code to assist in creating a journal. It is assigning a Nominal code to use based on certain criteria. The problem I have is that there can be several thousand lines on the spreadsheet and it is proving very time consuming to run.
Is there any alternative code that I can use to speed up the process?
Thanks on Advance.
Sub UpdateTOrigBankAcc()
'
' UpdateTOrigBankAcc Macro
'
'
Application.ScreenUpdating = False
Dim Lastrow As String
Sheets("Transactions Orig").Select
Range("A1").Select
Selection.End(xlDown).Select
Lastrow = ActiveCell.Row
Range("M2").Select
Selection.FormulaArray = _
"=INDEX(Identifier!C[-8],MATCH(1,(Identifier!C[-12]='Transactions Orig'!RC[-12])*(Identifier!C[-11]='Transactions Orig'!RC[-9]),0))"
Range("M3").Select
Selection.Copy
Range("M2:M" & Lastrow).Select
ActiveSheet.Paste
Columns("M:M").Select
Selection.Copy
Range("M1").Select
Selection.PasteSpecial Paste:=xlPasteValues
Application.ScreenUpdating = True
End Sub