السلام عليكم ورحمة الله و بركاته
في المثال اسفله لدي كود يقوم بالبحث في جميع الشيتات الموجودة في ملف العمل
ما اريده هو ان يقوم الكود بالبجث فقط في العمود C
بارك الله فيكم
وهذا هو الكود :
Sub MySearsh()
Dim Searsh As String
Dim FirstValue As String
Dim NextValue As String
Searsh = Application.InputBox(prompt:="Veuillez saisir une valeur", Title:="Microsoft Excel", Type:=2)
For Each sh In Worksheets
With sh
If .Cells.Find(What:=Searsh, After:=ActiveCell) Is Nothing Then GoTo 1
.Activate
With .Cells.Find(What:=Searsh, After:=ActiveCell)
.Activate
FirstValue = .Address
End With
Do
If .Cells.FindNext(After:=ActiveCell) Is Nothing Then GoTo 1
If MsgBox("Rechercher un autre résultat", vbYesNo, "Microsoft Excel") = vbNo Then Exit Sub
With .Cells.FindNext(After:=ActiveCell)
.Activate
NextValue = .Address
End With
Loop Until FirstValue = NextValue
End With
1 Next sh
End Sub