Sub FormatliAra(ByVal txtAranan As String)
Dim RngAra As Range
Dim RngSonuc As Range
Dim RngBul As Range
Dim RngBul2 As Range
Dim Cll As Range
Dim Sht As Worksheet
Dim Sht2 As Worksheet
Set Sht = ThisWorkbook.Worksheets("Arama")
Set Sht2 = ThisWorkbook.Worksheets("IVL")
Set RngAra = Sht2.Range("A:A")
' Clear previous formats and set new format
Application.FindFormat.Clear
Application.FindFormat.Font.Bold = True 'formatlı arama için gerekli kod
With Sht
Set RngBul = RngAra.Find(txtAranan, SearchFormat:=True)
SonStr = .Cells(.Rows.Count, "c").End(xlUp).Row
.Range("C2:x" & SonStr).ClearContents 'Arama Sayfasını boşaltan kod
If RngBul Is Nothing Then Exit Sub 'veri yoksa işlemi iptal etme
Set RngAra = Sht2.Range("A" & RngBul.Row & ":A" & RngBul.Row + 100)
Set RngBul2 = RngAra.Find("IVL No", SearchFormat:=True)
Set RngSonuc = Sht2.Range("A" & RngBul.Row - 1 & ":L" & RngBul2.Row - 1)
Debug.Print "RngBul2", RngBul2.Address(0, 0), RngSonuc.Address(0, 0)
For Each Cll In RngSonuc
If Cll.Value <> "" Then .Cells(Cll.Row + 3 - RngBul.Row, Cll.Column + 2).Value = Cll.Value
Next Cll
SonStr = .Cells(.Rows.Count, "c").End(xlUp).Row
.Range("C" & SonStr & ":N" & SonStr).Merge
.Range("C2:N" & SonStr).BorderAround Weight:=xlThin
End With
Application.FindFormat.Clear
End Sub
bu da alternatif bir yöntem dilerim işinize yarar