• DİKKAT

    DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
    Altın Üyelik Hakkında Bilgi

U5:U36 aralığındaki son dolu satır?

Katılım
2 Mart 2005
Mesajlar
2,960
Excel Vers. ve Dili
ev: Ofis 2007- Win Xp
iş: Ofis 2010- Win Vista
U5:U36 aralığındaki ilk dolu satır?

Kod:
uf_isl.txt_45_bf.Value = Format(ckBU_sfDVR.Cells(ckBU_sfDVR.[u36].End(3).Row, 21), "#.#0")  '45lk sn brf'||
kodu ile son dolu satırı tesbit edibiliyorum ancak u4 başlık satırı ve busatırı dikkate almasını istemiyorum.

ne yapmalıyım
 
çok az bir zaman geçti ama ustalar için basit bir soru olduğunu düşünüyorum
 
Merhabalar,

Aşağıdaki gibi bir yöntem kullanabilirsiniz. Düşündükçe başka yöntemler de olabilir.

Kod:
Dim hcr As Range
For Each hcr as ckBU_sfDVR.Range("U5:U36").Cells
    if isempty(hcr) = False then
    msgbox hcr.Address
    Exit for
next
 
teşekkür ederim hocam deneyelim
 
Merhabalar,

Aşağıdaki gibi bir yöntem kullanabilirsiniz. Düşündükçe başka yöntemler de olabilir.

Kod:
Dim hcr As Range
[color="red"] For Each hcr as ckBU_sfDVR.Range("U5:U36").Cells [/color]
    if isempty(hcr) = False then
    msgbox hcr.Address
    Exit for
next

hocam satır kızardı :)
As Yerine In YAptım Bu seferde Next Without For Hatası verdi
 
Ben de iyi sallamışım kodu ha :)

Şöyle yapın ...

Kod:
Dim hcr As Range
For Each hcr In ckBU_sfDVR.Range("U5:U36").Cells
    if Isempty(hcr) = False then
       Msgbox hcr.Address
       Exit for
    End If[LEFT]Next
[/LEFT]
 
hocam ne deseniz haklısınız ben yanlış sormuşum son dolu satırı istiyorum u4 hariç
verdiğiniz kodlar ilk dolu satır için güzel
Kod:
For Each hcr In ckBU_sfDVR.Range("U5:U36").Cells
    If IsEmpty(hcr) = False Then
       uf_isl.txt_45_bf.Value = hcr.Value
       Exit For
    End If
Next
 
Kod:
uf_isl.txt_45_bf.Value = Format(ckBU_sfDVR.Cells(ckBU_sfDVR.[u36].End(3).Row, 21), "#.#0")  '45lk sn brf'||
kodu ile son dolu satırı tesbit edibiliyorum ancak u4 başlık satırı ve busatırı dikkate almasını istemiyorum.


u5:u36 aralığındaki bütün hücreler boşsa uf_isl.txt_45_bf.Value = ""
u5 sondolu ise uf_isl.txt_45_bf.Value = u5.value
u6 sondolu ise uf_isl.txt_45_bf.Value = u6.value
......
u36 dolu ise uf_isl.txt_45_bf.Value = u36.value

nasıl denir vba ya
 
O zaman, belirttiğiniz aralıktaki son dolu hücreyi bulmak için, aşağıdaki kodu işletin.

Kod:
For j = 36 To 4 Step -1
    If IsEmpty(ckBU_sfDVR.Cells(j, "U")) <> False Then
       uf_isl.txt_45_bf.Value = ckBU_sfDVR.Cells(j, "U").Value
       Exit For
    End If
Next j
 
te&#351;ekk&#252;r ederim hocam
 
Kod:
For j = 36 To 4 Step -1
    If IsEmpty(ckBU_sfDVR.Cells(j, "U")) <> [B][color="Red"]True[/B][/color] Then
       uf_isl.txt_45_bf.Value = ckBU_sfDVR.Cells(j, "U").Value
       Exit For
    End If
Next j

True olmas&#305; gerekiyormu&#351; :)
False hali yani 9. mesaj son bo&#351; sat&#305;r&#305; buluyor ;)
 
Geri
Üst