DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub SIRALA()
Dim Deger As String, _
Bas As Integer, _
Bit As Integer, _
i As Integer
Application.ScreenUpdating = False
Deger = Range("B[B][COLOR=red]2[/COLOR][/B]")
Bas =[COLOR=red][B] 2[/B][/COLOR]
For i = [COLOR=red][B]2[/B][/COLOR] To Cells(Rows.Count, "B").End(3).Row + 1
If Not Cells(i, "B") = Deger Then
Deger = Cells(i, "B")
Bit = i - 1
Range(Cells(Bas, "E"), Cells(Bit, "G")).Sort Key1:=Cells(Bas, "F"), Order1:=xlAscending
Bas = Bit [COLOR=red][B]+ 1[/B][/COLOR]
End If
Next i
Application.ScreenUpdating = True
MsgBox "SIRALAMA BİTMİŞTİR...", vbInformation, "N. YEŞERTENER --> [URL="http://www.excel.web.tr/"]www.excel.web.tr[/URL]"
End Sub
Sub DUZENLE()
Dim i As Integer, _
j As Integer, _
k As Integer, _
Kol As Integer, _
s1 As Worksheet, _
s2 As Worksheet
Set s1 = Sheets("Veri")
Set s2 = Sheets("Sonuc")
Kol = s1.Cells(3, Columns.Count).End(1).Column
s2.Select
Application.ScreenUpdating = False
Cells.ClearContents
s1.Range("A2:D2").Copy Range("A1")
Range("E1") = "FİRMA"
Range("F1") = "BİRİM FİYATI"
Range("G1") = "TOPLAM FİYATI"
j = 1
For i = 4 To s1.Cells(Rows.Count, "A").End(3).Row
For k = 5 To Kol
j = j + 1
s1.Range("A" & i & ":D" & i).Copy Cells(j, "A")
Cells(j, 5) = s1.Cells(3, k)
Cells(j, 6) = s1.Cells(i, k)
Cells(j, 7) = "=F" & j & "*C" & j
Next k
Next i
Application.ScreenUpdating = True
SIRALA
End Sub
Sub Duzenle_Sirala()
Dim i As Integer, _
j As Integer, _
k As Integer, _
Bs As Integer, _
Bt As Integer, _
Kol As Integer, _
Deg As String, _
s1 As Worksheet, _
s2 As Worksheet
Set s1 = Sheets("Veri")
Set s2 = Sheets("Sonuc")
'Sayfadaki Son Kolon Numarası Bulunur, Bu Nedenle Fira Sayısı Önemli Değil
Kol = s1.Cells.Find("*", , , , xlByColumns, xlPrevious).Column
Application.ScreenUpdating = False
s2.Select
Cells.ClearContents
s1.Range("A2:D2").Copy Range("A1")
Range("E1") = "FİRMA"
Range("F1") = "BİRİM FİYATI"
Range("G1") = "TOPLAM FİYATI"
Deg = s1.Range("B4")
Bs = 2
j = 1
For i = 4 To s1.Cells(Rows.Count, "A").End(3).Row + 1
If Not s1.Cells(i, "B") = Deg Then
Bt = j
'Sıralama Yapılıyor
Range(Cells(Bs, "E"), Cells(Bt, "G")).Sort Key1:=Cells(Bs, "F")
Bs = j + 1
End If
For k = 5 To Kol
If s1.Cells(i, k) > "" Then
j = j + 1
s1.Range("A" & i & ":D" & i).Copy Cells(j, "A")
Cells(j, 5) = s1.Cells(3, k)
Cells(j, 6) = s1.Cells(i, k)
Cells(j, 7) = "=F" & j & "*C" & j
End If
Next k
Next i
Columns("F:G").NumberFormat = "#,##0.00"
MsgBox "DÜZENLEME Ve SIRILAMA BİTMİŞTİR....", vbInformation, "N. YEŞERTENER ---> www.excel.web.tr"
End Sub
Allah razı olsun Hocam,
bu kod sayesinde 1 haftalık işimiz 1 dk' da yanlışsız halloluyor.
ellerinize, aklınıza sağlık...