Skip to main content

AccessTr.neT


Vlookup İle Hücre Grubunu Sonuç Olarak Döndürme

Vlookup İle Hücre Grubunu Sonuç Olarak Döndürme

#23
hocam kodu aşağıdaki gibi düzenleyince bir soruna rastlamadım
sadece son satırın yüksekliğini otomati ayarlayacak kod bulamadım henüz
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 'formatly 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 Sayfasyny 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)

If RngBul2 Is Nothing Then rngRow = Sht2.Cells(Sht2.Rows.Count, "A").End(xlUp).Row Else rngRow = RngBul2.Row - 1

Set RngSonuc = Sht2.Range("A" & RngBul.Row - 1 & ":L" & rngRow)
Sht.Range("C2:XFD" & Rows.Count).Clear
RngSonuc.Copy
Sht.Range("C2").PasteSpecial xlPasteAllUsingSourceTheme

.Range("C2:N" & SonStr).BorderAround Weight:=xlThin
End With
Application.FindFormat.Clear
End Sub
Cevapla

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da

Bu Konudaki Yorumlar
RE: Vlookup İle Hücre Grubunu Sonuç Olarak Döndürme - Yazar: berduş - 06/05/2021, 13:24
Task