Je crois que j'ai eu tous les N° d'erreurs... Alors si quelqu'un pouvait me
trouver la bonne syntaxe ?
Je cherche toutes les lignes qui sont en gras dans la colonne A1:A50 de la
feuille 5
Il n'aime pas : Set c = .FindFormat.Font.Bold
Sub findbold()
Range("A1").Select
With Worksheets(5).Range("a1:a50")
With Application.FindFormat.Font
Set c = .FindFormat.Font.Bold
If Not c Is Nothing Then
firstAddress = c.Address
Do
c.Value = True
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With
End Sub
Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
michdenis
Bonjour
Voici une façon de sélectionner toutes les lignes qui ont au moins une cellule en gras dans la plage A1:G50 de la feuille 1 ....
à toi d'adapter ...
'---------------------------------- Sub FindBold()
Dim Rg As Range, D As Range, R As Range With Application.FindFormat.Font .FontStyle = "Gras" End With
With Worksheets("Feuil1") For Each R In .Range("a1:g50").Rows Set D = R.Find(What:="*", LookIn:=xlFormulas, LookAt:= _ xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:úlse, SearchFormat:=True) If Not D Is Nothing Then If Rg Is Nothing Then Set Rg = R Else Set Rg = Union(Rg, R) End If End If Next End With If Not Rg Is Nothing Then Rg.Select End If End Sub '----------------------------------
Salutations!
"twinley" <twinleym(at)hotmail.com> a écrit dans le message de news: Bonsoir,
Je crois que j'ai eu tous les N° d'erreurs... Alors si quelqu'un pouvait me trouver la bonne syntaxe ?
Je cherche toutes les lignes qui sont en gras dans la colonne A1:A50 de la feuille 5 Il n'aime pas : Set c = .FindFormat.Font.Bold
Sub findbold() Range("A1").Select With Worksheets(5).Range("a1:a50") With Application.FindFormat.Font Set c = .FindFormat.Font.Bold If Not c Is Nothing Then firstAddress = c.Address Do c.Value = True Set c = .FindNext(c) Loop While Not c Is Nothing And c.Address <> firstAddress End If End With End Sub
Merci pour l'aide -- à+twinley
Bonjour
Voici une façon de sélectionner toutes les lignes qui ont au moins
une cellule en gras dans la plage A1:G50 de la feuille 1 ....
à toi d'adapter ...
'----------------------------------
Sub FindBold()
Dim Rg As Range, D As Range, R As Range
With Application.FindFormat.Font
.FontStyle = "Gras"
End With
With Worksheets("Feuil1")
For Each R In .Range("a1:g50").Rows
Set D = R.Find(What:="*", LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:úlse, SearchFormat:=True)
If Not D Is Nothing Then
If Rg Is Nothing Then
Set Rg = R
Else
Set Rg = Union(Rg, R)
End If
End If
Next
End With
If Not Rg Is Nothing Then
Rg.Select
End If
End Sub
'----------------------------------
Salutations!
"twinley" <twinleym(at)hotmail.com> a écrit dans le message de news:ucP2uN7sEHA.220@TK2MSFTNGP15.phx.gbl...
Bonsoir,
Je crois que j'ai eu tous les N° d'erreurs... Alors si quelqu'un pouvait me
trouver la bonne syntaxe ?
Je cherche toutes les lignes qui sont en gras dans la colonne A1:A50 de la
feuille 5
Il n'aime pas : Set c = .FindFormat.Font.Bold
Sub findbold()
Range("A1").Select
With Worksheets(5).Range("a1:a50")
With Application.FindFormat.Font
Set c = .FindFormat.Font.Bold
If Not c Is Nothing Then
firstAddress = c.Address
Do
c.Value = True
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With
End Sub
Voici une façon de sélectionner toutes les lignes qui ont au moins une cellule en gras dans la plage A1:G50 de la feuille 1 ....
à toi d'adapter ...
'---------------------------------- Sub FindBold()
Dim Rg As Range, D As Range, R As Range With Application.FindFormat.Font .FontStyle = "Gras" End With
With Worksheets("Feuil1") For Each R In .Range("a1:g50").Rows Set D = R.Find(What:="*", LookIn:=xlFormulas, LookAt:= _ xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:úlse, SearchFormat:=True) If Not D Is Nothing Then If Rg Is Nothing Then Set Rg = R Else Set Rg = Union(Rg, R) End If End If Next End With If Not Rg Is Nothing Then Rg.Select End If End Sub '----------------------------------
Salutations!
"twinley" <twinleym(at)hotmail.com> a écrit dans le message de news: Bonsoir,
Je crois que j'ai eu tous les N° d'erreurs... Alors si quelqu'un pouvait me trouver la bonne syntaxe ?
Je cherche toutes les lignes qui sont en gras dans la colonne A1:A50 de la feuille 5 Il n'aime pas : Set c = .FindFormat.Font.Bold
Sub findbold() Range("A1").Select With Worksheets(5).Range("a1:a50") With Application.FindFormat.Font Set c = .FindFormat.Font.Bold If Not c Is Nothing Then firstAddress = c.Address Do c.Value = True Set c = .FindNext(c) Loop While Not c Is Nothing And c.Address <> firstAddress End If End With End Sub
Merci pour l'aide -- à+twinley
twinley
merci michdenis pour tes lumières Bonne soirée -- à+twinley "michdenis" a écrit dans le message de news:%
Bonjour
Voici une façon de sélectionner toutes les lignes qui ont au moins une cellule en gras dans la plage A1:G50 de la feuille 1 ....
à toi d'adapter ...
'---------------------------------- Sub FindBold()
Dim Rg As Range, D As Range, R As Range With Application.FindFormat.Font .FontStyle = "Gras" End With
With Worksheets("Feuil1") For Each R In .Range("a1:g50").Rows Set D = R.Find(What:="*", LookIn:=xlFormulas, LookAt:= _ xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:úlse, SearchFormat:=True) If Not D Is Nothing Then If Rg Is Nothing Then Set Rg = R Else Set Rg = Union(Rg, R) End If End If Next End With If Not Rg Is Nothing Then Rg.Select End If End Sub '----------------------------------
Salutations!
"twinley" <twinleym(at)hotmail.com> a écrit dans le message de news:
Bonsoir,
Je crois que j'ai eu tous les N° d'erreurs... Alors si quelqu'un pouvait me
trouver la bonne syntaxe ?
Je cherche toutes les lignes qui sont en gras dans la colonne A1:A50 de la feuille 5 Il n'aime pas : Set c = .FindFormat.Font.Bold
Sub findbold() Range("A1").Select With Worksheets(5).Range("a1:a50") With Application.FindFormat.Font Set c = .FindFormat.Font.Bold If Not c Is Nothing Then firstAddress = c.Address Do c.Value = True Set c = .FindNext(c) Loop While Not c Is Nothing And c.Address <> firstAddress End If End With End Sub
Merci pour l'aide -- à+twinley
merci michdenis pour tes lumières
Bonne soirée
--
à+twinley
"michdenis" <michdenis@hotmail.com> a écrit dans le message de
news:%23akurq7sEHA.376@TK2MSFTNGP09.phx.gbl...
Bonjour
Voici une façon de sélectionner toutes les lignes qui ont au moins
une cellule en gras dans la plage A1:G50 de la feuille 1 ....
à toi d'adapter ...
'----------------------------------
Sub FindBold()
Dim Rg As Range, D As Range, R As Range
With Application.FindFormat.Font
.FontStyle = "Gras"
End With
With Worksheets("Feuil1")
For Each R In .Range("a1:g50").Rows
Set D = R.Find(What:="*", LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:úlse, SearchFormat:=True)
If Not D Is Nothing Then
If Rg Is Nothing Then
Set Rg = R
Else
Set Rg = Union(Rg, R)
End If
End If
Next
End With
If Not Rg Is Nothing Then
Rg.Select
End If
End Sub
'----------------------------------
Salutations!
"twinley" <twinleym(at)hotmail.com> a écrit dans le message de
news:ucP2uN7sEHA.220@TK2MSFTNGP15.phx.gbl...
Bonsoir,
Je crois que j'ai eu tous les N° d'erreurs... Alors si quelqu'un pouvait
me
trouver la bonne syntaxe ?
Je cherche toutes les lignes qui sont en gras dans la colonne A1:A50 de la
feuille 5
Il n'aime pas : Set c = .FindFormat.Font.Bold
Sub findbold()
Range("A1").Select
With Worksheets(5).Range("a1:a50")
With Application.FindFormat.Font
Set c = .FindFormat.Font.Bold
If Not c Is Nothing Then
firstAddress = c.Address
Do
c.Value = True
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With
End Sub
merci michdenis pour tes lumières Bonne soirée -- à+twinley "michdenis" a écrit dans le message de news:%
Bonjour
Voici une façon de sélectionner toutes les lignes qui ont au moins une cellule en gras dans la plage A1:G50 de la feuille 1 ....
à toi d'adapter ...
'---------------------------------- Sub FindBold()
Dim Rg As Range, D As Range, R As Range With Application.FindFormat.Font .FontStyle = "Gras" End With
With Worksheets("Feuil1") For Each R In .Range("a1:g50").Rows Set D = R.Find(What:="*", LookIn:=xlFormulas, LookAt:= _ xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:úlse, SearchFormat:=True) If Not D Is Nothing Then If Rg Is Nothing Then Set Rg = R Else Set Rg = Union(Rg, R) End If End If Next End With If Not Rg Is Nothing Then Rg.Select End If End Sub '----------------------------------
Salutations!
"twinley" <twinleym(at)hotmail.com> a écrit dans le message de news:
Bonsoir,
Je crois que j'ai eu tous les N° d'erreurs... Alors si quelqu'un pouvait me
trouver la bonne syntaxe ?
Je cherche toutes les lignes qui sont en gras dans la colonne A1:A50 de la feuille 5 Il n'aime pas : Set c = .FindFormat.Font.Bold
Sub findbold() Range("A1").Select With Worksheets(5).Range("a1:a50") With Application.FindFormat.Font Set c = .FindFormat.Font.Bold If Not c Is Nothing Then firstAddress = c.Address Do c.Value = True Set c = .FindNext(c) Loop While Not c Is Nothing And c.Address <> firstAddress End If End With End Sub