this is running slowing....could someone pls recommend a way to speed this up? im afraid of doing calculation xlmanual....will that mena the loops wont work?
Code:
Dim chk As String
Dim amtc
Dim found As String
Dim clear_c As Integer 'total record count on "Cleared" sheet
Dim os_c As Integer 'total record count on "Outstanding Cheques" sheet
Dim nf_c As Integer 'total record count on "Cleared Not Outstanding" sheet
Dim nf_r As Range
'Clear "Cleared Not Outstanding" data
Sheets("Cleared-Not-In-Outstanding").Select
Selection.CurrentRegion.ClearContents
Range("A1") = "Reference"
Range("B1") = "Gross Amount"
'Count total number of records on "Outstanding Cheques" sheet
Sheets("Outstanding_Cheques").Select
os_c = Range("A6").CurrentRegion.Rows.Count
'Count total number of records on "Cleared" sheet
Sheets("Cleared").Select
clear_c = Range("A1").CurrentRegion.Rows.Count
'Loop through each record on "Clear" sheet.
'Check to see if the record exists on "Outstanding" sheet.
For I = 1 To clear_c
Let found = "False"
chk = ActiveCell.Offset(I - 1, 0).Value
amtc = ActiveCell.Offset(I - 1, 1).Value
Sheets("Outstanding_Cheques").Select
Range("A6").Select
For y = 1 To os_c - 1
'If the value reference and amount agree, cut the cleared cheque from the outstandings list and move it to cashed
If (ActiveCell.Offset(y - 1, 1).Value = chk) And (ActiveCell.Offset(y - 1, 2).Value = amtc) Then
ActiveCell.Offset(y - 1, 0).Select
ActiveCell.EntireRow.Cut Sheets("Cashed").Range("A65536").End(xlUp).Offset(1, 0)
ActiveCell.EntireRow.Delete
os_c = os_c - 1
Let found = "True"
Exit For
End If
Next y
'If the cleared cheque doesn't match any items in the outstanding list, paste the data on the cleared not os sheet
If found = "False" Then
Sheets("Cleared-Not-In-Outstanding").Select
Range("A1").Select
nf_c = Range("A1").CurrentRegion.Rows.Count
ActiveCell.Offset(nf_c, 0).Value = chk
ActiveCell.Offset(nf_c, 1).Value = amtc
End If
Sheets("Cleared").Select
Range("A1").Select
Next I
'update cashed tab
Dim clear_date As String
clear_date = Range("D1")
Sheets("Cashed").Select
Range("e65536").End(xlUp).Activate
ActiveCell.Offset(1, 0).EntireRow.Insert
ActiveCell.Offset(2, 0).Select
Do
ActiveCell.Value = clear_date
ActiveCell.Offset(1, 0).Select
Loop Until IsEmpty(ActiveCell.Offset(0, -1))
Sheets("Reconciliation").Select
Range("d3").Select