- Katılım
- 18 Ekim 2008
- Mesajlar
- 48
- Excel Vers. ve Dili
- Microsoft Office Excel 2010
Arkadaşlar merhaba,
Aşağıda ki VBA kodunda "Sayfa1(ANASAYFA TL)" "Sayfa2(Ana Sayfa)" den beslenerek verileri hücrelerine taşımaktadır.
Ancak dosya konumu değişmiştir.
"\\Sunucu\SERKAN\Üretim\Üretim_Yeni.xlsm\Ana Sayfa"
Yardımlarınızı bekliyorum. İyi çalışmalar...
Sub OzetListe()
Dim d, s, a1, a2, deg, i As Long
Set d = CreateObject("Scripting.Dictionary")
Application.ScreenUpdating = False
Sheets("ANASAYFA TL").Select
Range("H32:I" & Rows.Count) = ""
With Sheets("Ana Sayfa")
For i = 2 To .Cells(Rows.Count, "B").End(xlUp).Row
If .Cells(i, "B") <> "" And .Cells(i, "F") <> "" Then
deg = .Cells(i, "B")
If Not d.exists(deg) Then
s = Array(1, .Cells(i, "F"))
d.Add deg, s
Else
s = d.Item(deg)
s(1) = s(1) & "-" & .Cells(i, "F")
d.Item(deg) = s
End If
End If
Next i
a1 = d.keys: a2 = d.items
For i = 0 To d.Count - 1
Cells(i + 32, "H") = a1(i)
s = a2(i)
Cells(i + 32, "I") = s(1)
Next i
End With
Set d = Nothing
Application.ScreenUpdating = True
End Sub
Aşağıda ki VBA kodunda "Sayfa1(ANASAYFA TL)" "Sayfa2(Ana Sayfa)" den beslenerek verileri hücrelerine taşımaktadır.
Ancak dosya konumu değişmiştir.
"\\Sunucu\SERKAN\Üretim\Üretim_Yeni.xlsm\Ana Sayfa"
Yardımlarınızı bekliyorum. İyi çalışmalar...
Sub OzetListe()
Dim d, s, a1, a2, deg, i As Long
Set d = CreateObject("Scripting.Dictionary")
Application.ScreenUpdating = False
Sheets("ANASAYFA TL").Select
Range("H32:I" & Rows.Count) = ""
With Sheets("Ana Sayfa")
For i = 2 To .Cells(Rows.Count, "B").End(xlUp).Row
If .Cells(i, "B") <> "" And .Cells(i, "F") <> "" Then
deg = .Cells(i, "B")
If Not d.exists(deg) Then
s = Array(1, .Cells(i, "F"))
d.Add deg, s
Else
s = d.Item(deg)
s(1) = s(1) & "-" & .Cells(i, "F")
d.Item(deg) = s
End If
End If
Next i
a1 = d.keys: a2 = d.items
For i = 0 To d.Count - 1
Cells(i + 32, "H") = a1(i)
s = a2(i)
Cells(i + 32, "I") = s(1)
Next i
End With
Set d = Nothing
Application.ScreenUpdating = True
End Sub
