View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
G C G C is offline
external usenet poster
 
Posts: 6
Default VBA assistance needed

On Friday, May 6, 2016 at 1:15:30 PM UTC+5:30, Claus Busch wrote:
Hi,

Am Fri, 6 May 2016 00:29:16 -0700 (PDT) schrieb G C:

I have to reconcile my multiple bank account transactions with my system's compiled transactions and need the unique system id against that account no.

I've coded the same but 2 problem arise.

1. If bank transaction are out of my system transactions the system stop running and showing error "object not Found" instead of skipping transaction and moving to next transaction.

2. I have few similar(Amount) transactions in my 2 different accounts for which i need to run "findnext" command but its not working in this as well.


Try (unstested):

Sub Reconciling()

Dim Mycell As Range, c As Range
Dim Newrange As Range, sys_amt As Range
Dim FirstAddress As String
Dim LRow As Long

LRow = Cells(Rows.Count, 2).End(xlUp).Row
Set sys_amt = Range("B2:B" & LRow)
Set Newrange = Range("F2:F" & LRow)

For Each Mycell In Newrange
Set c = sys_amt.Find(Mycell, LookIn:=xlValues)
If Not c Is Nothing Then
FirstAddress = c.Address
Do
c.Offset(, 2) = c.Offset(, -1)
Set c = sys_amt.FindNext(c)
Loop While Not c Is Nothing And FirstAddress < c.Address
End If
Next

End Sub


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional


Thanks! for you prompt reply and knowledge.

It surely gonna help me.