- Katılım
- 5 Nisan 2008
- Mesajlar
- 352
- Excel Vers. ve Dili
-
Microsoft Office Standard 2010 TR
32 Bit
- Altın Üyelik Bitiş Tarihi
- 31-01-2024
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