- Katılım
- 21 Mart 2011
- Mesajlar
- 6
- Excel Vers. ve Dili
- 2010, Türkçe
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Option Explicit
Sub ÖZET_RAPOR()
Dim S1 As Worksheet, S2 As Worksheet
Dim X As Long, BUL As Range, ADRES As String
Application.ScreenUpdating = False
Set S1 = Sheets("Gunluk")
Set S2 = Sheets("ÖZET")
S2.Range("A:C").ClearContents
S2.Range("C1") = "Fat No"
S1.Range("C5:D65536").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=S2.Range("A1"), Unique:=True
S2.Range("A2:B65536").Sort Key1:=S2.Range("A2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal
For X = 2 To S2.Range("A65536").End(3).Row
Set BUL = S1.Range("C5:C65536").Find(S2.Cells(X, 1), LookAt:=xlWhole)
If Not BUL Is Nothing Then
ADRES = BUL.Address
Do
If BUL.Offset(0, 1) = S2.Cells(X, 2) Then
S2.Cells(X, 3) = IIf(S2.Cells(X, 3) = "", BUL.Offset(0, 2), S2.Cells(X, 3) & "," & BUL.Offset(0, 2))
End If
Set BUL = S1.Range("C5:C65536").FindNext(BUL)
Loop While Not BUL Is Nothing And BUL.Address <> ADRES
End If
Next
S2.Select
Set BUL = Nothing
Set S1 = Nothing
Set S2 = Nothing
Application.ScreenUpdating = True
MsgBox "İşleminiz tamamlanmıştır.", vbInformation
End Sub
Option Explicit
Sub BİLGİLERİ_DÜZENLE()
Dim S1 As Worksheet, S2 As Worksheet, X As Long
Dim BUL As Range, ADRES As String, Son_Satır As Long, Formül As String
Application.ScreenUpdating = False
Set S1 = Sheets("OTF")
Set S2 = Sheets("STOKGIRIS")
S1.Range("AN3:AP1048576").ClearContents
S2.Range("T7:T1048576").ClearContents
Son_Satır = S2.Range("A1048576").End(3).Row
For X = 3 To S1.Range("A1048576").End(3).Row
If S1.Cells(X, "K") <> "" Then
Set BUL = S2.Range("C:C").Find(S1.Cells(X, "K"), LookAt:=xlWhole)
If Not BUL Is Nothing Then
ADRES = BUL.Address
Do
If BUL.Offset(0, 16) = S1.Cells(X, "B") Then
S1.Cells(X, "AN") = IIf(S1.Cells(X, "AN") = "", BUL.Offset(0, 19), S1.Cells(X, "AN") & " , " & BUL.Offset(0, 19))
S1.Cells(X, "AO") = IIf(S1.Cells(X, "AO") = "", Format(BUL.Offset(0, 21), "dd.mm.yyyy"), S1.Cells(X, "AO").Text & " , " & Format(BUL.Offset(0, 21), "dd.mm.yyyy"))
Formül = "=SUMPRODUCT((" & S2.Name & "!S7:S1048576&" & S2.Name & "!C7:C1048576=""" & Cells(X, "B") & "" & "" & Cells(X, "K") & """)*(" & S2.Name & "!AE7:AE1048576))"
S1.Cells(X, "AP") = Evaluate(Replace(Formül, 1048576, Son_Satır))
End If
Set BUL = S2.Range("C:C").FindNext(BUL)
Loop While Not BUL Is Nothing And BUL.Address <> ADRES
End If
End If
Next
For X = 7 To S2.Range("A1048576").End(3).Row
If S2.Cells(X, "C") <> "" Then
Set BUL = S1.Range("K:K").Find(S2.Cells(X, "C"), LookAt:=xlWhole)
If Not BUL Is Nothing Then
ADRES = BUL.Address
Do
S2.Cells(X, "T") = IIf(S2.Cells(X, "T") = "", BUL.Offset(0, -9), S2.Cells(X, "T") & " , " & BUL.Offset(0, -9))
Set BUL = S1.Range("K:K").FindNext(BUL)
Loop While Not BUL Is Nothing And BUL.Address <> ADRES
End If
End If
Next
Set BUL = Nothing
Set S1 = Nothing
Set S2 = Nothing
Application.ScreenUpdating = True
MsgBox "İşleminiz tamamlanmıştır.", vbInformation
End Sub