- Katılım
- 24 Haziran 2011
- Mesajlar
- 599
- Excel Vers. ve Dili
- EXCEL 2010 & ACCESS 2007 ENGLISH
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub Grup()
Dim i As Long, _
j As Long, _
Kol As Integer, _
Deg As String
Application.ScreenUpdating = False
Sheets(1).Select
For i = 1 To Cells(Rows.Count, "A").End(3).Row
If Not Deg = Cells(i, "A") & Cells(i, "B") Then
Deg = Cells(i, "A") & Cells(i, "B")
Kol = Kol + 1
Sheets(2).Cells(1, Kol) = Deg
j = 1
End If
j = j + 1
Sheets(2).Cells(j, Kol) = Cells(i, "C")
Next i
Application.ScreenUpdating = True
MsgBox "Listeleme Bitmiştir....", vbInformation, "Necdet YEŞERTENER --> [URL="http://www.excel.web.tr/"]www.excel.web.tr[/URL]"
End Sub
Necdet Bey diğer üstadlar;
Elinize sağlık, çok teşekkür ederim, rica ettiğim işlemi çok güzel kodlamışsınız.
Kusura bakmayın ama ilk mesajımda belirtmeyi unuttuğum bir iki nokta. Ekte ayrıntısı ile anlattım. İlgilenirseniz çok mutlu olurum.
Saygılar.
Sub Grup()
Dim i As Long, _
j As Long, _
Kol As Integer, _
Deg As String
Application.ScreenUpdating = False
[B][COLOR=red]Sheets(2).Cells.ClearContents
[/COLOR][/B] Sheets(1).Select
[B][COLOR=red] 'Var Olan Ad Tanımları AU İle Başlıyorsa Silinir
For i = ActiveWorkbook.Names.Count To 1 Step -1
If ActiveWorkbook.Names(i).Name Like "AU*" Then ActiveWorkbook.Names(i).Delete
Next i
[/COLOR][/B]
For i = 1 To Cells(Rows.Count, "A").End(3).Row + 1
If Not Deg = Cells(i, "A") & Cells(i, "B") Then
[COLOR=red][B] If Not Deg = "" Then
ActiveWorkbook.Names.Add _
Name:=Deg, _
RefersTo:="=" & Sheets(2).Name & "!" & Range(Cells(2, Kol), Cells(j, Kol)).Address
End If
[/B][/COLOR]
Deg = Cells(i, "A") & Cells(i, "B")
Kol = Kol + 1
Sheets(2).Cells(1, Kol) = Deg
Sheets(2).Cells(2, Kol) = "ALL"
j = 2
End If
j = j + 1
Sheets(2).Cells(j, Kol) = Cells(i, "C")
Next i
Application.ScreenUpdating = True
MsgBox "Listeleme Bitmiştir....", vbInformation, "Necdet YEŞERTENER --> [URL="http://www.excel.web.tr/"]www.excel.web.tr[/URL]"
End Sub