اذهب الي المحتوي
أوفيسنا
بحث مخصص من جوجل فى أوفيسنا
Custom Search

جلب بيانات كشف حساب المالك بين تاريخين


kharboush
إذهب إلى أفضل إجابة Solved by بن علية حاجي,

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

احسنت استاذ بن علية كود ممتاز 

وبعد اذن حضرتك وزيادة فى اثراء الموضوع -هذا كود اخر للحل

Option Explicit
Sub Inqwayry7()
Dim Q1, Q2, q3, FR, TR
     Dim S_sh As Worksheet: Set S_sh = Sheets("ÇáíæãíÉ")
     Dim T_sh As Worksheet: Set T_sh = Sheets("ßÔÝ ÇáÍÓÇÈ")
    Range("A7:j1000").ClearContents
Q1 = Range("b2")
Q2 = Range("b3")
q3 = Range("D2")
TR = 7
    If Range("b2").Value > Range("b3").Value Then
        MsgBox "åäÇß ÎØà Ýí ÊÑÊíÈ ÇáÊÇÑíÎ", vbExclamation, "ÎØÃ"
    Exit Sub
    End If
With S_sh
For FR = 7 To 3333
If .Cells(FR, 1) >= Q1 And .Cells(FR, 1) <= Q2 And .Cells(FR, 2) = q3 Then
Cells(TR, 1) = .Cells(FR, 1)
Cells(TR, 2) = .Cells(FR, 2)
Cells(TR, 3) = .Cells(FR, 3)
Cells(TR, 4) = .Cells(FR, 4)
Cells(TR, 5) = .Cells(FR, 5)
Cells(TR, 6) = .Cells(FR, 6)
Cells(TR, 7) = .Cells(FR, 7)
Cells(TR, 8) = .Cells(FR, 8)
Cells(TR, 9) = .Cells(FR, 9)
Cells(TR, 10) = .Cells(FR, 10)
TR = TR + 1
    End If
   Next FR
End With
End Sub




ولكن بالتأكيد كود حضرتك الأفضل فهو كود صغير وبسيط وادى الغرض بكل كفاءة

 

كشف حساب بين تاريخين.xlsm

  • Like 3
رابط هذا التعليق
شارك

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