• Merhaba Ziyaretçi,
    Microsoft 365 Uygulamaları ile ilgili yeni haberler, dikkat çekici konular, ilgi ile takip edeceğiniz yazılar için.

    Abone Olun
  • ESTE - Microsoft Office Eğitimleri

    Yeni yıl Microsoft Office Eğitim planlarınız için bütçenizi oluşturmadan önce ESTE eğitim kalitesi ile tanışın. 🙌
    Kullanıcıların ihtiyacı olan yazılı materyal, dosya ve video kaynağı desteğimiz ile tüm ofis çalışanlarının iş süreçlerini rahatlatacak eğitimler planlayın. 🎯
    Microsoft Office eğitimlerimiz hakkında detaylı bilgi için bize ulaşın.

    👉 Microsoft Office Eğitim Talebi

Yardım Kapalı dosyalardan makro ile çokeğersay ile veri çekme

muzos80

Yeni Üye
Katılım
6 Şub 2019
Mesajlar
23
En iyi yanıt
0
Puanları
1
Yaş
51
Konum
Kartal
Ad Soyad
Mustafa Boğa
Office Vers.
2013
Merhaba aşağıdaki gibi yaptığım çokeğersay makrosu ile bir dosyadan veri alıyorum ama aynı dosyalardan farklı klasörlerde aynı verilerim var aşağıdaki makroyu klasör seçmeli nasıl yapabilirim

Sub kapaliExcelİslem()
Range("B5:D15").ClearContents

yol = "C:\Users\MUSTAFA\Desktop\çalışma\"


Set exel1 = Workbooks.Open(yol & "Tüm Üniteler Hata Kartı 2020 (1).xlsm")

ThisWorkbook.Sheets("sayfa1").Range("B7") = exel1.Application.WorksheetFunction.CountIfs(Range("d5:d1000"), "Kırmızı", Range("a5:a1000"), "Ambalaj")
ThisWorkbook.Sheets("sayfa1").Range("c7") = exel1.Application.WorksheetFunction.CountIfs(Range("d5:d1000"), "Beyaz", Range("a5:a1000"), "Ambalaj")
ThisWorkbook.Sheets("sayfa1").Range("d7") = exel1.Application.WorksheetFunction.CountIfs(Range("d5:d1000"), "Yeşil", Range("a5:a1000"), "Ambalaj")
ThisWorkbook.Sheets("sayfa1").Range("B8") = exel1.Application.WorksheetFunction.CountIfs(Range("d5:d1000"), "Kırmızı", Range("a5:a1000"), "Boyama")
ThisWorkbook.Sheets("sayfa1").Range("c8") = exel1.Application.WorksheetFunction.CountIfs(Range("d5:d1000"), "Beyaz", Range("a5:a1000"), "Boyama")
ThisWorkbook.Sheets("sayfa1").Range("d8") = exel1.Application.WorksheetFunction.CountIfs(Range("d5:d1000"), "Yeşil", Range("a5:a1000"), "Boyama")

exel1.Close True

Set exel1 = Nothing



End Sub
 

muzos80

Yeni Üye
Katılım
6 Şub 2019
Mesajlar
23
En iyi yanıt
0
Puanları
1
Yaş
51
Konum
Kartal
Ad Soyad
Mustafa Boğa
Office Vers.
2013
Sorunu aşağıdaki gibi çözdüm ama + olarak yaparak aynı kişiye ait kriter Beyaz olanları tüm excel dosyalarından toplam alamıyorum
ustalarımdan desteğe ihtiyacım var

ThisWorkbook.Sheets("BOG").Range("R125:T158").ClearContents
yol = ThisWorkbook.Sheets("BOG").Range("AB59") & "\" 'Dosyanın adresi
' AÇILACAK EXCEL DOSYALARI
Set exel1 = Workbooks.Open(yol & ThisWorkbook.Sheets("BOG").Range("AB60"))
Set exel2 = Workbooks.Open(yol & ThisWorkbook.Sheets("BOG").Range("AB61"))
Set exel3 = Workbooks.Open(yol & ThisWorkbook.Sheets("BOG").Range("AB62"))
Set exel4 = Workbooks.Open(yol & ThisWorkbook.Sheets("BOG").Range("AB63"))
Set exel5 = Workbooks.Open(yol & ThisWorkbook.Sheets("BOG").Range("AB64"))
' Çalışan 1 kişi için
ThisWorkbook.Sheets("BOG").Range("R125") = exel1.Application.WorksheetFunction.CountIfs(Range("d5:d10000"), "Beyaz", Range("g5:g10000"), ThisWorkbook.Sheets("BOG").Range("Q125")) + _
exel2.Application.WorksheetFunction.CountIfs(Range("d5:d10000"), "Beyaz", Range("g5:g10000"), ThisWorkbook.Sheets("BOG").Range("Q125")) + _
exel3.Application.WorksheetFunction.CountIfs(Range("d5:d10000"), "Beyaz", Range("g5:g10000"), ThisWorkbook.Sheets("BOG").Range("Q125")) + _
exel4.Application.WorksheetFunction.CountIfs(Range("d5:d10000"), "Beyaz", Range("g5:g10000"), ThisWorkbook.Sheets("BOG").Range("Q125")) + _
exel5.Application.WorksheetFunction.CountIfs(Range("d5:d10000"), "Beyaz", Range("g5:g10000"), ThisWorkbook.Sheets("BOG").Range("Q125"))

ThisWorkbook.Sheets("BOG").Range("S125") = exel1.Application.WorksheetFunction.CountIfs(Range("d5:d10000"), "Kırmızı", Range("g5:g10000"), ThisWorkbook.Sheets("BOG").Range("Q125")) + _
exel2.Application.WorksheetFunction.CountIfs(Range("d5:d10000"), "Kırmızı", Range("g5:g10000"), ThisWorkbook.Sheets("BOG").Range("Q125")) + _
exel3.Application.WorksheetFunction.CountIfs(Range("d5:d10000"), "Kırmızı", Range("g5:g10000"), ThisWorkbook.Sheets("BOG").Range("Q125")) + _
exel4.Application.WorksheetFunction.CountIfs(Range("d5:d10000"), "Kırmızı", Range("g5:g10000"), ThisWorkbook.Sheets("BOG").Range("Q125")) + _
exel5.Application.WorksheetFunction.CountIfs(Range("d5:d10000"), "Kırmızı", Range("g5:g10000"), ThisWorkbook.Sheets("BOG").Range("Q125"))

ThisWorkbook.Sheets("BOG").Range("T125") = exel1.Application.WorksheetFunction.CountIfs(Range("d5:d10000"), "Yeşil", Range("g5:g10000"), ThisWorkbook.Sheets("BOG").Range("Q125")) + _
exel2.Application.WorksheetFunction.CountIfs(Range("d5:d10000"), "Yeşil", Range("g5:g10000"), ThisWorkbook.Sheets("BOG").Range("Q125")) + _
exel3.Application.WorksheetFunction.CountIfs(Range("d5:d10000"), "Yeşil", Range("g5:g10000"), ThisWorkbook.Sheets("BOG").Range("Q125")) + _
exel4.Application.WorksheetFunction.CountIfs(Range("d5:d10000"), "Yeşil", Range("g5:g10000"), ThisWorkbook.Sheets("BOG").Range("Q125")) + _
exel5.Application.WorksheetFunction.CountIfs(Range("d5:d10000"), "Yeşil", Range("g5:g10000"), ThisWorkbook.Sheets("BOG").Range("Q125"))
exel1.Close True
exel2.Close True
exel3.Close True
exel4.Close True
exel5.Close True

Set exel1 = Nothing
Set exel2 = Nothing
Set exel3 = Nothing
Set exel4 = Nothing
Set exel5 = Nothing
Application.ScreenUpdating = True
End Sub
 
Üst Alt