اذهب الي المحتوي
أوفيسنا

الردود الموصى بها

  • أفضل إجابة
قام بنشر

السلام عليكم ورحمة الله

استخدم هذا الكود

Sub Tarhil()
Dim ws As Worksheet, Sh As Worksheet
Dim Arr As Variant, Temp As Variant
Dim LR As Long, i As Long, j As Long, p As Long
Dim Setlt As String
Set ws = Sheets("كشف السداد")
Set Sh = Sheets("حساب العملاء")
Setlt = "تم السداد"
LR = ws.Range("B" & Rows.Count).End(xlUp).Row
Arr = ws.Range("B5:F" & LR).Value
ReDim Temp(1 To UBound(Arr, 1), 1 To UBound(Arr, 2))
For i = 1 To UBound(Arr, 1)
If Arr(i, 5) = Setlt Then
p = p + 1
For j = 1 To 4
Temp(p, j) = Arr(i, Choose(j, 1, 2, 3, 5))
Next
End If
Next
If p > 0 Then Sh.Range("B4").Resize(p, UBound(Temp, 2)).Value = Temp
End Sub

 

  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information