Keresés

Új hozzászólás Aktív témák

  • Acustic

    újonc

    válasz Fferi50 #35715 üzenetére

    Sub névminta()
    '
    ' névminta Makró
    ' ctrl+n a neveket előbb besárgítja, majd kereső funkcióra áll, megtalálja az első nevet.
    '
    ' Billentyűparancs: Ctrl+n
    '
    Range("H1").Select
    Selection.Copy
    Range("I1").Select
    Application.ReplaceFormat.Clear
    Application.ReplaceFormat.NumberFormat = "General"
    With Application.ReplaceFormat
    .HorizontalAlignment = xlRight
    .VerticalAlignment = xlTop
    .WrapText = False
    .Orientation = 0
    .AddIndent = False
    .ShrinkToFit = False
    End With
    With Application.ReplaceFormat.Font
    .Name = "Arial"
    .FontStyle = "Normál"
    .Size = 12
    .Strikethrough = False
    .Superscript = False
    .Subscript = False
    .ThemeColor = 2
    .TintAndShade = 0
    .ThemeFont = xlThemeFontNone
    End With
    Application.ReplaceFormat.Borders(xlLeft).LineStyle = xlNone
    Application.ReplaceFormat.Borders(xlRight).LineStyle = xlNone
    Application.ReplaceFormat.Borders(xlBottom).LineStyle = xlNone
    Application.ReplaceFormat.Borders(xlDiagonalDown).LineStyle = xlNone
    Application.ReplaceFormat.Borders(xlDiagonalUp).LineStyle = xlNone
    With Application.ReplaceFormat.Interior
    .Pattern = xlSolid
    .PatternColorIndex = xlAutomatic
    .Color = 65535
    .TintAndShade = 0
    .PatternTintAndShade = 0
    End With
    Application.ReplaceFormat.Locked = True
    Application.ReplaceFormat.FormulaHidden = False
    Columns("A:A").Select
    Selection.Replace What:="John", Replacement:="John", LookAt:=xlWhole, _
    SearchOrder:=xlByColumns, MatchCase:=False, SearchFormat:=False, _
    ReplaceFormat:=True
    Application.ReplaceFormat.NumberFormat = "General"
    Range("I2").Select
    Application.ReplaceFormat.Clear
    Application.ReplaceFormat.NumberFormat = "General"
    With Application.ReplaceFormat
    .HorizontalAlignment = xlLeft
    .VerticalAlignment = xlTop
    .WrapText = False
    .Orientation = 0
    .AddIndent = False
    .ShrinkToFit = False
    End With
    With Application.ReplaceFormat.Font
    .Name = "Arial"
    .FontStyle = "Normál"
    .Size = 12
    .Strikethrough = False
    .Superscript = False
    .Subscript = False
    .Color = -16776961
    .TintAndShade = 0
    .ThemeFont = xlThemeFontNone
    End With
    Application.ReplaceFormat.Borders(xlLeft).LineStyle = xlNone
    Application.ReplaceFormat.Borders(xlRight).LineStyle = xlNone
    Application.ReplaceFormat.Borders(xlBottom).LineStyle = xlNone
    Application.ReplaceFormat.Borders(xlDiagonalDown).LineStyle = xlNone
    Application.ReplaceFormat.Borders(xlDiagonalUp).LineStyle = xlNone
    With Application.ReplaceFormat.Interior
    .Pattern = xlNone
    .TintAndShade = 0
    .PatternTintAndShade = 0
    End With
    Application.ReplaceFormat.Locked = True
    Application.ReplaceFormat.FormulaHidden = False
    Range("A1").Select
    Cells.Find(What:="John", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
    :=xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase _
    :=False, SearchFormat:=False).Activate
    End Sub

    A keresés Mindig a H1 ben lévo szóra indulna el, ami változik, hiszen a "h" oszlopban szereplo nevek érkezési sorrendben változnak. Hogy értheto legyen ....... Szinkront rendezek. Jon egy színész, és azt mondom, hogy van egy John nevu karaktere. Besárgítom neki az összes John-t, hogy jobban átláthato legyen számára. Amikor pedig felvettük azt a sort, akkor átváltozik pirosra a név. ebbbol tudom, hogy már fölvettuk azt a szereplot. De mivel egy nap 60 szor kell ezt megcsinálni, az már fáraszto. :) Minden munkafolyamatra van már kész makro-m ....de ez már naggyon megakasztott :))) köszönöm a segítségedet ......az is nagy dolog, ha legalább azt meg tudod mondani, hogy merre induljak el. MÁr az angol oldalakat is végignéztem, de valószínuleg nem látom át a lehetoségeket. .....

Új hozzászólás Aktív témák