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

احتاج ماكرو اخفاء السطور التى بين التاريخ فى a2 ,b2


omhamzh
إذهب إلى أفضل إجابة Solved by سليم حاصبيا,

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

السلام عليكم ورحمة الله اهل المنتدى

ارجو مساعدتى

المطلوب إخفاء السطور التي بين التاريخ فىA2,B2

اذا كان التاريخ فى العمود a يقع بين او يساوى التاريخ فى A2 وB2 يتم اخفاء  وذلك حتى اتمكن من طباعة السطور وزر اخر لاظهارها مرة اخرى مع الشكر والدعاء

المبلغ عن مدة اخفاء السطور.xlsm

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

  • أفضل إجابة

Try This Macro

Option Explicit

Sub Hide_rows()
Dim Main_Rg As Range
Dim cel As Range
Dim Min_date As Date, Max_date As Date

show_rows
With Sheets("نوفمبر 2020")
    
    Min_date = Application.Min(.Range("A2:B2"))
    Max_date = Application.Max(.Range("A2:B2"))
    Set Main_Rg = .Range("A4").CurrentRegion.Offset(1).Columns(2)
    
    For Each cel In Main_Rg.Cells
        If cel >= Min_date And cel <= Max_date Then
           cel.EntireRow.Hidden = True
        End If
    Next
End With
End Sub
'++++++++++++++++++++++++++++++++++++++
Sub show_rows()
 Sheets("نوفمبر 2020").Rows.Hidden = False
End Sub

Om_hamz_hid_rowa.xlsm

  • 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