If Target.Column = 23 Then
Dim counta, r As Long
countt = Sheets("InvoiceDatabase").Cells(Rows.count, "A").End(xlUp).Row
t = 3
Do While t <= countt
invno = Sheet4.Range("b" & t).Value
invno = Format(StrConv(invno, vbUpperCase))
For r = 3 To Sheet19.Range("c10").End(xlUp).Row
For x = 1 To Len(Sheet19.Cells(r, 3))
a = invno.TextLength
If UCase(Mid(Sheet19.Cells(r, 3), x, a)) = invno Then
paid = Format(Sheet19.Cells(r, "F"), "####0.00") 'Paid
End If
Next x
Next r
Sheet4.Range("ai" & t).Value = Sheet4.Range("w" & t).Value
t = t + 1
Loop
End If
Hi above code apply in Sheets('InvoiceDatabase")
the lopp in Do while work fine.
but when i want to extract the value in sheet19 , it doesn't work anymore
For r = 3 To Sheet19.Range("c10").End(xlUp).Row
how to fixed this?
how to create second loop in another sheets to extract the value