cemshan
Altın Üye
- Katılım
- 5 Nisan 2008
- Mesajlar
- 358
- Excel Vers. ve Dili
- Office 365
- Altın Üyelik Bitiş Tarihi
- 06-12-2025
Merhaba arkadaşlar. Aşağıda yazdığım kodu kullanıyorum ancak sayfa ilerledikçe sürekli aralık miktarını güncellemek zorunda kalıyorum. Bu kodu son dolu satıra kadar uygulması için nasıl günceleyebilirim.
Sub gunluk()
Dim x1 As Worksheet
Dim x2 As Worksheet
Set x1 = Sheets("Girişlerr")
Set x2 = Sheets("Veri")
x1.Range("a2:a9000") = Application.WorksheetFunction.IfError(Application.WorksheetFunction.VLookup(x1.Range("c2:c9000"), x2.Range("a:j"), 4, 0), "")
x1.Range("l2:l9000") = Application.WorksheetFunction.IfError(Application.WorksheetFunction.VLookup(x1.Range("c2:c9000"), x2.Range("a:j"), 10, 0), "")
x1.Range("j2:j9000") = Application.WorksheetFunction.IfError(Application.WorksheetFunction.VLookup(x1.Range("c2:c9000"), x2.Range("a:j"), 3, 0), "")
x1.Range("m2:m9000") = Application.WorksheetFunction.IfError(Application.WorksheetFunction.VLookup(x1.Range("c2:c9000"), x2.Range("a:j"), 5, 0), "")
x1.Range("k2:k9000") = Application.WorksheetFunction.IfError(Application.WorksheetFunction.VLookup(x1.Range("b2:b9000"), x2.Range("m:n"), 2, 0), "")
Call crpgetir
End Sub
Sub crpgetir()
With Sheets("Girişlerr").Range("h2:h9000")
.Formula = "=if(Girişlerr!f2*Girişlerr!m2=0,"""",Girişlerr!f2*Girişlerr!m2)"
.Value = .Value
End With
With Sheets("Girişlerr").Range("I2:I9000")
.Formula = "=if(Girişlerr!g2*Girişlerr!m2=0,"""",Girişlerr!g2*Girişlerr!m2)"
.Value = .Value
End With
End Sub
Sub gunluk()
Dim x1 As Worksheet
Dim x2 As Worksheet
Set x1 = Sheets("Girişlerr")
Set x2 = Sheets("Veri")
x1.Range("a2:a9000") = Application.WorksheetFunction.IfError(Application.WorksheetFunction.VLookup(x1.Range("c2:c9000"), x2.Range("a:j"), 4, 0), "")
x1.Range("l2:l9000") = Application.WorksheetFunction.IfError(Application.WorksheetFunction.VLookup(x1.Range("c2:c9000"), x2.Range("a:j"), 10, 0), "")
x1.Range("j2:j9000") = Application.WorksheetFunction.IfError(Application.WorksheetFunction.VLookup(x1.Range("c2:c9000"), x2.Range("a:j"), 3, 0), "")
x1.Range("m2:m9000") = Application.WorksheetFunction.IfError(Application.WorksheetFunction.VLookup(x1.Range("c2:c9000"), x2.Range("a:j"), 5, 0), "")
x1.Range("k2:k9000") = Application.WorksheetFunction.IfError(Application.WorksheetFunction.VLookup(x1.Range("b2:b9000"), x2.Range("m:n"), 2, 0), "")
Call crpgetir
End Sub
Sub crpgetir()
With Sheets("Girişlerr").Range("h2:h9000")
.Formula = "=if(Girişlerr!f2*Girişlerr!m2=0,"""",Girişlerr!f2*Girişlerr!m2)"
.Value = .Value
End With
With Sheets("Girişlerr").Range("I2:I9000")
.Formula = "=if(Girişlerr!g2*Girişlerr!m2=0,"""",Girişlerr!g2*Girişlerr!m2)"
.Value = .Value
End With
End Sub