- Katılım
- 8 Mart 2009
- Mesajlar
- 504
- Excel Vers. ve Dili
- 2010
Sub sorgula()
Set s1 = Sheets("liste")
Set s2 = Sheets("rapor")
basla = Time
s2.[a2:e65536].ClearContents
For a = 2 To [b65536].End(3).Row
For d = 7 To 11
Select Case d
Case 7: If s1.[g2] <> "" And s1.Cells(a, "b") <> s1.[g2] Then GoTo 20
Case 8: If s1.[h2] <> "" And s1.Cells(a, "c") <> s1.[h2] Then GoTo 20
Case 9: If s1.[I2] <> "" And s1.Cells(a, "d") < s1.[I2] Then GoTo 20
Case 10: If s1.[j2] <> "" And s1.Cells(a, "d") > s1.[j2] Then GoTo 20
Case 11: If s1.[k2] <> "" And s1.Cells(a, "e") < s1.[k2] Then GoTo 20
End Select
Next
c = c + 1
s2.Range("a" & c + 1 & ":e" & c + 1) = s1.Range("a" & a & ":e" & a).Value
20 Next
bitis = Time
MsgBox c & " adet veri bulunmuştur." & Chr(13) & Chr(13) & "Sorgulama Süresi: " & Format(bitis - basla, "hh:mm:ss")
End Sub
http://www.excel.web.tr/f142/veri-tabanyndan-secilen-kriterlere-gore-sorgulama-t30754/sayfa2.html
buradan indirdiğim ekteki dosyada hatamı var acaba RAPORLA denince hata veriyor yoksa hata bizdemi.
makroda raporla denince hata veriyor.
Set s1 = Sheets("liste")
Set s2 = Sheets("rapor")
basla = Time
s2.[a2:e65536].ClearContents
For a = 2 To [b65536].End(3).Row
For d = 7 To 11
Select Case d
Case 7: If s1.[g2] <> "" And s1.Cells(a, "b") <> s1.[g2] Then GoTo 20
Case 8: If s1.[h2] <> "" And s1.Cells(a, "c") <> s1.[h2] Then GoTo 20
Case 9: If s1.[I2] <> "" And s1.Cells(a, "d") < s1.[I2] Then GoTo 20
Case 10: If s1.[j2] <> "" And s1.Cells(a, "d") > s1.[j2] Then GoTo 20
Case 11: If s1.[k2] <> "" And s1.Cells(a, "e") < s1.[k2] Then GoTo 20
End Select
Next
c = c + 1
s2.Range("a" & c + 1 & ":e" & c + 1) = s1.Range("a" & a & ":e" & a).Value
20 Next
bitis = Time
MsgBox c & " adet veri bulunmuştur." & Chr(13) & Chr(13) & "Sorgulama Süresi: " & Format(bitis - basla, "hh:mm:ss")
End Sub
http://www.excel.web.tr/f142/veri-tabanyndan-secilen-kriterlere-gore-sorgulama-t30754/sayfa2.html
buradan indirdiğim ekteki dosyada hatamı var acaba RAPORLA denince hata veriyor yoksa hata bizdemi.
makroda raporla denince hata veriyor.
