- Katılım
- 6 Eylül 2004
- Mesajlar
- 239
- Excel Vers. ve Dili
- Excel 2013 Türkçe
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Private Sub ComboBox1_Change()
On Error Resume Next
Dim myarr() As String, k As Range, a As Long, j As Integer, ilk_adres As String
ListBox1.ColumnCount = 5
ListBox1.ColumnWidths = "30;80;50;40;0"
ListBox1.RowSource = vbNullString
ReDim myarr(1 To 5, 1 To 1)
Set k = Sheets("sipariş").Range("B2:B65536").Find(ComboBox1.Text & "*", , xlValues, xlWhole)
If Not k Is Nothing Then
ilk_adres = k.Address
Do
a = a + 1
ReDim Preserve myarr(1 To 5, 1 To a)
For j = -1 To 1
myarr(j + 2, a) = k.Offset(0, j).Value
Next j
myarr(5, a) = k.Row
Set k = Sheets("sipariş").Range("B2:B65536").FindNext(k)
Loop While k.Address <> ilk_adres And Not k Is Nothing
ListBox1.Column = myarr
End If
End Sub
Private Sub ListBox1_Click()
Dim j As Integer
j = ListBox1.Column(4)
Sheets("cikti").Range("I3").Value = Sheets("sipariş").Range("A" & j).Value
End Sub
Private Sub UserForm_Initialize()
Dim AllCells As Range, Cell As Range
Dim ciftolmayan As New Collection
Dim Item
Set AllCells = Sheets("sipariş").Range("b9:b1000")
On Error Resume Next
For Each Cell In AllCells
ciftolmayan.Add Cell.Value, CStr(Cell.Value)
Next Cell
On Error GoTo 0
For Each Item In ciftolmayan
UserForm2.ComboBox1.AddItem Item
Next Item
End Sub
Private Sub UserForm_Initialize()
Dim son As Long, a As Long, i As Integer
son = Sheets("Sipariş").[b65536].End(3).Row
For i = 9 To son
a = Sheets("sipariş").[ee65536].End(3).Row
If WorksheetFunction.CountIf(Sheets("sipariş").Range("ee1:ee" & a), Sheets("sipariş").Cells(i, "b")) >= 1 Then
Else
Sheets("sipariş").Cells(a + 1, "ee").Value = Sheets("sipariş").Cells(i, "b").Value
End If
Next
Sheets("sipariş").Select
Columns("EE:EE").Sort Key1:=Range("EE1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
ComboBox1.RowSource = "Sipariş!EE1:EE" & Sheets("Sipariş").Cells(65536, "EE").End(xlUp).Row
End Sub