Sub bulsay59()
Dim sh As Worksheet, sonsat As Long, baslangic As Date
Dim i As Long, sayi As Byte, say As Integer
baslangic = Now
Sheets("Sayfa1").Select
Application.ScreenUpdating = False
Set sh = Sheets("Sayfa_1")
sh.Range("AH4:AJ" & Rows.Count).ClearContents
sonsat = sh.Cells(Rows.Count, "D").End(xlUp).Row
If Sayfa2.OptionButton4.Value = True Then sayi = 3
For i = 4 To sonsat
For j = 4 To 5
If CInt(sh.Cells(i, j).Value) = CInt(Cells(27, j - 3).Value) Then say = say + 1
Next j
For j = 11 To 12
If CInt(sh.Cells(i, j).Value) = CInt(Cells(27, j - 3).Value) Then say = say + 1
Next j
If say >= sayi Then
sh.Cells(i, "AH").Value = "BULUNDU"
Else
sh.Cells(i, "AH").Value = "BULUNMADI"
End If
sh.Cells(i, "AI").Value = say
say = 0
Next i
Application.ScreenUpdating = True
sh.Select
MsgBox "Bitti." & vbLf & "Süre : " & Format(Now - baslangic, "hh:mm:ss")
End Sub
Asıl Aramayı sayfa 1 deki w4 x4 y4 z4 te yapmasını istiyorum nasıl yapabilirim herşeyi denedim pek beceremedim
Dim sh As Worksheet, sonsat As Long, baslangic As Date
Dim i As Long, sayi As Byte, say As Integer
baslangic = Now
Sheets("Sayfa1").Select
Application.ScreenUpdating = False
Set sh = Sheets("Sayfa_1")
sh.Range("AH4:AJ" & Rows.Count).ClearContents
sonsat = sh.Cells(Rows.Count, "D").End(xlUp).Row
If Sayfa2.OptionButton4.Value = True Then sayi = 3
For i = 4 To sonsat
For j = 4 To 5
If CInt(sh.Cells(i, j).Value) = CInt(Cells(27, j - 3).Value) Then say = say + 1
Next j
For j = 11 To 12
If CInt(sh.Cells(i, j).Value) = CInt(Cells(27, j - 3).Value) Then say = say + 1
Next j
If say >= sayi Then
sh.Cells(i, "AH").Value = "BULUNDU"
Else
sh.Cells(i, "AH").Value = "BULUNMADI"
End If
sh.Cells(i, "AI").Value = say
say = 0
Next i
Application.ScreenUpdating = True
sh.Select
MsgBox "Bitti." & vbLf & "Süre : " & Format(Now - baslangic, "hh:mm:ss")
End Sub
Asıl Aramayı sayfa 1 deki w4 x4 y4 z4 te yapmasını istiyorum nasıl yapabilirim herşeyi denedim pek beceremedim
