Çok eski bir web tarayıcısı kullanıyorsunuz. Bu veya diğer siteleri görüntülemekte sorunlar yaşayabilirsiniz.. Tarayıcınızı güncellemeli veya alternatif bir tarayıcı kullanmalısınız.
BİRDEN FAZLA EXCELL ÇALIŞMA KİTABINDAKİ BİR VERİYİ DEĞİŞTİR İLE BAŞKA VERİ İLE DEĞİŞME
Aşağıdaki kodu deneyebilirsiniz
Korunan sayfalar varsa kod başarısız olur.
Kod:
sub buldeğiştir()
Dim strPath As String
Dim strFile As String
Dim wbk As Workbook
Dim wsh As Worksheet
Dim strFind As String
Dim strReplace As String
strFind = InputBox("Enter text to find")
If strFind = "" Then
MsgBox "Bulunacak metni girin", vbExclamation
Exit Sub
End If
strReplace = InputBox("Değiştirme metnini girin ")
With Application.FileDialog(msoFileDialogFolderPicker)
If .Show Then
strPath = .SelectedItems(1)
Else
MsgBox "Klasör seçilmedi!", vbExclamation
Exit Sub
End If
End With
If Right(strPath, 1) <> "\" Then
strPath = strPath & "\"
End If
Application.ScreenUpdating = False
strFile = Dir(strPath & "*.xlsx*")
Do While strFile <> ""
Set wbk = Workbooks.Open(Filename:=strPath & strFile, AddToMRU:=False)
For Each wsh In wbk.Worksheets
wsh.Cells.Replace What:=strFind, Replacement:=strReplace, _
LookAt:=xlWhole, MatchCase:=False
Next wsh
wbk.Close SaveChanges:=True
strFile = Dir
Loop
Application.ScreenUpdating = True
end sub
Sizlere daha iyi bir deneyim sunabilmek icin sitemizde çerez konumlandırmaktayız, web sitemizi kullanmaya devam ettiğinizde çerezler ile toplanan kişisel verileriniz Veri Politikamız / Bilgilendirmelerimizde belirtilen amaçlar ve yöntemlerle mevzuatına uygun olarak kullanılacaktır.