View Single Post
  #7   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 5:21:56 PM UTC+5:30, Claus Busch wrote:
Hi,

Am Fri, 6 May 2016 03:43:21 -0700 (PDT) schrieb G C:

I'm getting the id against the amount but the id is reflecting is system column, i need the same in bank column against bank transaction.


try:

Sub Reconciling2()

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
If c.Offset(, 1) = Mycell.Offset(, 1) Then
Mycell.Offset(, 2) = c.Offset(, -1)
End If
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 Mr. Claus,

Its Done! :)