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

تصفية لكل صف


إذهب إلى أفضل إجابة Solved by lionheart,

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

 

السلام عليكم ورحمه الله وبركاته وبها نبدأ

أريد تصفية لكل صف بحيث يظهر في Drop Down اسماء الطلبة في ملف التقديم سواء الاساسي او الثانوي

المطلوب بداخل الملف بدون حمايه

 اريد في ورقتي سجل1 وسجل2 من قائمة Drop Down ان تظهر فيها اسماء الطلبة 1ب (اولى ابتدائي) مثلا لطباعة اوراق التقديم بناءا على وررقة شيت المسماه( 1) من عمود الصف عند التصفية وليس حميع الصفوف 1ع (اولى اعدادي) او 1ث ع ( اولى ثانوي عام) او 1ث ت (اولى ثانوي تجاري) او 1ث ز (اولى ثانوي زراعي) 

 

برنامج التقديم لجميع المراحل التعليميه.rar

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

Select the drop down form control and rename it [myDropDown] in the Name Box

Then put the following code in a standard module

Sub Fill_DropDown_Form_Control()
    Dim ws As Worksheet, sh As Worksheet, myDrop As dropDown, r As Long, i As Long
    With ThisWorkbook
        Set ws = .Worksheets("1"): Set sh = .Worksheets(Join(Array(Chr(211), Chr(204), Chr(225), Chr(49)), Empty))
    End With
    Set myDrop = sh.DropDowns("myDropDown")
    ReDim a(1 To 100)
    For r = 8 To ws.Range("I3").Value + 7
        If ws.Cells(r, "K").Value = sh.Range("U1").Value Then
            i = i + 1
            a(i) = ws.Cells(r, "C").Value
        End If
    Next r
    myDrop.RemoveAllItems
    If i > 0 Then
        ReDim Preserve a(1 To i)
        myDrop.List = a
    End If
End Sub

 

You have to put the grade in specific cell say cell U1 in the same worksheet of the drop down and also put the following code in the worksheet module

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Range("B1") = ActiveCell.Row
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address = "$U$1" Then Call Fill_DropDown_Form_Control
End Sub

 

so simply to use the code, type the grade you want in cell U1 then the drop down will be filled with the names related to that grade

تم تعديل بواسطه lionheart
  • Like 1
رابط هذا التعليق
شارك

عزيزي / ليون شكرا على الاستجابة  والرد من جانب حضرتك ... ولكن لاتتغير الاسماء مع تغيرها في الدروب داون في الاستمارات فما السبب. وسوف ابعث لك الملف مرة ثانية باكواد حضرتك وانظر ماهو الخطأ عندي.

برنامج التقديم لجميع المراحل التعليمية - Copy.xlsb

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

  • أفضل إجابة

Use this code

Sub DropDownSelection()
    Dim v, x, ws As Worksheet, myDrop As DropDown
    Application.ScreenUpdating = False
        Set ws = ThisWorkbook.Worksheets("1")
        Set myDrop = ActiveSheet.DropDowns("myDropDown")
        v = myDrop.List(myDrop.Value)
        x = Application.Match(v, ws.Columns(3), 0)
        If Not IsError(x) Then
            With ActiveSheet
                .Range("C9").Value = ws.Cells(x, 3).Value
                .Range("J9").Value = ws.Cells(x, 4).Value
                
                'complete by yourself
            End With
        End If
    Application.ScreenUpdating = True
End Sub

 

Assign macro to the drop down by right-click on the drop down and select Assign Macro and select the macro name [DropDownSelection]

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

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