NADİR YILDIZ
Altın Üye
- Katılım
- 7 Ocak 2006
- Mesajlar
- 1,413
- Excel Vers. ve Dili
- 2016 Türkçe
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub JL_Sutunlarini_Aya_Aktar()
Dim wsKaynak As Worksheet
Dim wsHedef As Worksheet
Dim sonSatirJ As Long
Dim sonSatirL As Long
Dim i As Long
Dim hedefSatir As Long
' SAYFA İSİMLERİNİ BURAYA YAZ
Set wsKaynak = ThisWorkbook.Sheets("E-FATURA EKSİK BUL") ' Verilerin olduğu sayfa
Set wsHedef = ThisWorkbook.Sheets("KONTROL") ' Yapıştırılacak sayfa
' Hedef A sütununu temizle
wsHedef.Range("A2:A5000").ClearContents
' Son dolu satırları bul
sonSatirJ = wsKaynak.Cells(wsKaynak.Rows.Count, "J").End(xlUp).Row
sonSatirL = wsKaynak.Cells(wsKaynak.Rows.Count, "L").End(xlUp).Row
hedefSatir = 2
' J sütununu kopyala
For i = 2 To sonSatirJ
If wsKaynak.Cells(i, "J").Value <> "" Then
wsHedef.Cells(hedefSatir, "A").Value = wsKaynak.Cells(i, "J").Value
hedefSatir = hedefSatir + 1
End If
Next i
' L sütununu altına ekle
For i = 2 To sonSatirL
If wsKaynak.Cells(i, "L").Value <> "" Then
wsHedef.Cells(hedefSatir, "A").Value = wsKaynak.Cells(i, "L").Value
hedefSatir = hedefSatir + 1
End If
Next i
MsgBox "J ve L sütunları başarıyla birleştirildi.", vbInformation
End Sub
Sub DolguRengineGoreX()
Dim ws As Worksheet
Dim sonSatir As Long
Dim i As Long
Set ws = ThisWorkbook.Sheets("Kontrol") ' Sayfa adını değiştir
sonSatir = ws.Cells(ws.Rows.Count, "A").End(xlUp).Row
For i = 1 To sonSatir
' Hücrede dolgu rengi var mı kontrol et
If ws.Cells(i, "A").Interior.ColorIndex <> xlNone Then
ws.Cells(i, "C").Value = "X"
Else
ws.Cells(i, "C").ClearContents
End If
Next i
MsgBox "İşlem tamamlandı.", vbInformation
End Sub
Sub KosulluRengeGoreX()
Dim ws As Worksheet
Dim sonSatir As Long
Dim i As Long
Set ws = ThisWorkbook.Sheets("kontrol") ' Sayfa adını değiştir
sonSatir = ws.Cells(ws.Rows.Count, "A").End(xlUp).Row
For i = 2 To sonSatir
' Hücrenin görünen dolgu rengine bak
If ws.Cells(i, "A").DisplayFormat.Interior.ColorIndex <> xlColorIndexNone Then
ws.Cells(i, "C").Value = "X"
Else
ws.Cells(i, "C").ClearContents
End If
Next i
MsgBox "Koşullu biçimlendirme dahil kontrol tamamlandı.", vbInformation
End Sub