Filtering Data

MKK

New Member
Joined
Nov 15, 2005
Messages
20
Hello All,

This is how my data in the excel sheet look like..

Pin Name Type Site
----------- ------- -------
IS HVIO 5.a16
GND_OUT3 HVIO 5.d26
GND_OUT HVIO 5.a20
VBB HVIO 5.d18
VBB_HS HVIO 5.a24
VBB_HS_CAP HVIO 5.a28
NC_5_DC DCVI 10.a12
NC_6_DC DCVI 10.a8
DELAY_DC DCVI 10.a2
INH_DC DCVI 10.a6
IN_DC DCVI 10.a10
IS_DC DCVI 10.a14
T3 I/O 11.b18
T4 I/O 11.d18
T5 I/O 11.a17
T6 I/O 11.c17
T7 I/O 11.b16
T8 I/O 11.d16
T9 I/O 11.a15
K5 Utility 8.b36
K6A_D Utility 8.c36
K7ABC Utility 8.d36
K8AB Utility 8.a37
K9ABC Utility 8.b37
K10AB Utility 8.c37


I have to get Pin name as input in the userform according to the Type mentioned..this is what i have wrote for it...
----------------------------------
Private Sub UserForm_Activate()
Dim s1 As String

Me.ComboBox1.Clear


For Row = 6 To 16
s1 = Worksheets("Chans Site1").Cells(Row, 2).Text

ComboBox1.AddItem s1

Next Row
End Sub
----------------------------------

Now the problem is If the "Type" is not in order ...like...

Pin Name Type Site
------------- --------- --------
IS HVIO 5.a16
GND_OUT3 HVIO 5.d26
NC_6_DC DCVI 10.a8
DELAY_DC DCVI 10.a2
VBB HVIO 5.d18
T5 I/O 11.a17
T6 I/O 11.c17
VBB_HS HVIO 5.a24
VBB_HS_CAP HVIO 5.a28
NC_5_DC DCVI 10.a12

There are many test userforms.The combo boxes in these userforms should show only a particlar "Type" inputs ...
For ex. For DCVI tests the combo box in the DCVI userform should show only the pins for DCVI type..


what should I do...Can anyone plz help me...

Thanks in advance

Regards,

MKK
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
Like this?

Code:
Private Sub UserForm_Activate()
    Dim r As Long
    ComboBox1.Clear
    With Worksheets("Chans Site1")
        For r = 1 To .Range("A65536").End(xlUp).Row
            If .Cells(r, 2).Value = "DCVI" Then
                ComboBox1.AddItem .Cells(r, 1).Value
            End If
        Next r
    End With
End Sub
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,052
Messages
5,835,146
Members
430,342
Latest member
Sailingexcel

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top