- Katılım
- 8 Haziran 2007
- Mesajlar
- 761
- Excel Vers. ve Dili
- excel- 2003 Türkçe
Günaydın Arkadaşlar. Aşağıdaki kod ile F sutunundaki dolu hücreleri sıralatıyorum. Aynı sutunda boş olan hücreleri sıralamak için ne yapabilirim.
kolay gelsin teşekkürler
Sub sayfa()
Sheets("Karara_Çıkanlar").Range("B3:f63").ClearContents
Dim Hucre As Range
Set shD = Sheets("Data")
Set shA = Sheets("Karara_Çıkanlar")
Y = 4
For Each Hucre In shD.Range("f3:f100")
If IsError(Hucre) = True Then: GoTo f1
If Hucre.Value = 0 Or Hucre.Value = "" Then: GoTo f1
shA.Cells(Y, 2) = shD.Cells(Hucre.Row, 2)
shA.Cells(Y, 3) = shD.Cells(Hucre.Row, 3)
shA.Cells(Y, 4) = shD.Cells(Hucre.Row, 4)
shA.Cells(Y, 5) = shD.Cells(Hucre.Row, 5)
shA.Cells(Y, 6) = shD.Cells(Hucre.Row, 6)
shA.Cells(Y, 100) = shD.Cells(Hucre.Row, Hucre.Column)
Y = Y + 1
f1:
Next
Set shD = Nothing
Set shA = Nothing
End Sub
kolay gelsin teşekkürler
Sub sayfa()
Sheets("Karara_Çıkanlar").Range("B3:f63").ClearContents
Dim Hucre As Range
Set shD = Sheets("Data")
Set shA = Sheets("Karara_Çıkanlar")
Y = 4
For Each Hucre In shD.Range("f3:f100")
If IsError(Hucre) = True Then: GoTo f1
If Hucre.Value = 0 Or Hucre.Value = "" Then: GoTo f1
shA.Cells(Y, 2) = shD.Cells(Hucre.Row, 2)
shA.Cells(Y, 3) = shD.Cells(Hucre.Row, 3)
shA.Cells(Y, 4) = shD.Cells(Hucre.Row, 4)
shA.Cells(Y, 5) = shD.Cells(Hucre.Row, 5)
shA.Cells(Y, 6) = shD.Cells(Hucre.Row, 6)
shA.Cells(Y, 100) = shD.Cells(Hucre.Row, Hucre.Column)
Y = Y + 1
f1:
Next
Set shD = Nothing
Set shA = Nothing
End Sub