- Katılım
- 5 Kasım 2007
- Mesajlar
- 4,727
- Excel Vers. ve Dili
- 64 Bit TR - Microsoft Office 365 - Win11 Home
Merhaba,
Aşağıdaki kod ile aranılan değeri bulabiliyorum, ancak aranılan değer A1:A31 aralığından daha aşağıda ise ekranda görülmemektedir,
İsteğim ; Aranılan değer hangi hücre/hücrelerde ise ekranda görebileyim,
Örneğin bulunan değer A55:A70 aralığında ise PgDn yapmadan ekranda görülebilsin,
Teşekkür ederim.
Sub BUL()
yer = WorksheetFunction.CountA(Columns("A"))
Range("A1:A1300").Interior.ColorIndex = 2
ad = InputBox("aranacak değeri yazınız.", "DEĞER", "")
If ad = "" Then
MsgBox "İşlemi iptal ettiniz"
Exit Sub
End If
sat = 0
With Range("A1:A1300")
Set d = .Find(ad, LookIn:=xlValues, lookat:=xlWhole)
If Not d Is Nothing Then
firstAddress = d.Address
Do
d.Interior.ColorIndex = 3 'buradaki sayı, renkleri göstermektedir.
sat = sat + 1
Set d = .FindNext(d)
Loop While Not d Is Nothing And d.Address <> firstAddress
End If
End With
MsgBox sat & " adet bulundu"
End Sub
Aşağıdaki kod ile aranılan değeri bulabiliyorum, ancak aranılan değer A1:A31 aralığından daha aşağıda ise ekranda görülmemektedir,
İsteğim ; Aranılan değer hangi hücre/hücrelerde ise ekranda görebileyim,
Örneğin bulunan değer A55:A70 aralığında ise PgDn yapmadan ekranda görülebilsin,
Teşekkür ederim.
Sub BUL()
yer = WorksheetFunction.CountA(Columns("A"))
Range("A1:A1300").Interior.ColorIndex = 2
ad = InputBox("aranacak değeri yazınız.", "DEĞER", "")
If ad = "" Then
MsgBox "İşlemi iptal ettiniz"
Exit Sub
End If
sat = 0
With Range("A1:A1300")
Set d = .Find(ad, LookIn:=xlValues, lookat:=xlWhole)
If Not d Is Nothing Then
firstAddress = d.Address
Do
d.Interior.ColorIndex = 3 'buradaki sayı, renkleri göstermektedir.
sat = sat + 1
Set d = .FindNext(d)
Loop While Not d Is Nothing And d.Address <> firstAddress
End If
End With
MsgBox sat & " adet bulundu"
End Sub
