Thema Datum  Von Nutzer Rating
Antwort
04.08.2014 09:23:35 Leoni
NotSolved
04.08.2014 09:41:52 Gast54042
NotSolved
04.08.2014 10:21:51 Gast92598
NotSolved
04.08.2014 10:22:30 Gast19588
NotSolved
Rot ActiveCell - Spalten verändern
04.08.2014 10:26:37 Gast59259
NotSolved
04.08.2014 10:29:10 Gast67654
NotSolved

Ansicht des Beitrags:
Von:
Gast59259
Datum:
04.08.2014 10:26:37
Views:
805
Rating: Antwort:
  Ja
Thema:
ActiveCell - Spalten verändern

Sub Makro1()
'
' Makro1 Makro
'
' Tastenkombination: Strg+s
'
    Application.Goto Reference:="Makro1"
    
Dim strZ As String
Dim Cll As Range
Dim daa As Range
Dim objZ As Range
Dim i As Integer
Dim z As Integer
Dim myCell As Range


'Set myCell.Range = ActiveCell.Range

'myCell.Row = ActiveCell.Row - 1
'myCell.Column = ActiveCell.Column


strZ = "+ "
For Each Cll In Selection
Set objZ = Cells.Find _
(What:=strZ, After:=ActiveCell, SearchOrder:=xlByColumns, LookAt:=xlPart)


If objZ Is Nothing Then
GoTo Adios
Else
objZ = Application.WorksheetFunction.Substitute _
(objZ, strZ, vbLf & "- ")
objZ.Select
i = i + 1
End If


    Next Cll
Adios:
MsgBox "Es wurden " & i & " Ersetzungen durchgeführt."
Set objZ = Nothing
Set Cll = Nothing


strZ = "-"
For Each daa In ActiveWorkbook.Worksheets(1).Cells
Set objZ = Cells.Find _
(What:=strZ, After:=ActiveCell, SearchOrder:=xlByRows, LookAt:=xlPart)

If objZ Is Nothing Then
End
Else
objZ = Application.WorksheetFunction.Substitute _
(objZ, strZ, "+ ")
objZ.Select
i = i + 1
End If

z = InStr(ActiveCell, "+ ")


   With ActiveCell.Characters(Start:=1, Length:=0).Font
        .Name = "Arial"
        .FontStyle = "Standard"
        .Size = 9.5
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleNone
        .ColorIndex = xlAutomatic
        .TintAndShade = 0
        .ThemeFont = xlThemeFontMinor
    End With
    With ActiveCell.Characters(Start:=1, Length:=z).Font
        .Name = "Arial"
        .FontStyle = "Fett"
        .Size = 9.5
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleSingle
        .ColorIndex = xlAutomatic
        .TintAndShade = 0
        .ThemeFont = xlThemeFontMinor
    End With
    With ActiveCell.Characters(Start:=z, Length:=8).Font
        .Name = "Arial"
        .FontStyle = "Standard"
        .Size = 9.5
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleNone
        .ColorIndex = xlAutomatic
        .TintAndShade = 0
        .ThemeFont = xlThemeFontMinor
    End With
   
    
Next daa

 
End Sub
 


Ihre Antwort
  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen
Thema: Name: Email:



  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen

Thema Datum  Von Nutzer Rating
Antwort
04.08.2014 09:23:35 Leoni
NotSolved
04.08.2014 09:41:52 Gast54042
NotSolved
04.08.2014 10:21:51 Gast92598
NotSolved
04.08.2014 10:22:30 Gast19588
NotSolved
Rot ActiveCell - Spalten verändern
04.08.2014 10:26:37 Gast59259
NotSolved
04.08.2014 10:29:10 Gast67654
NotSolved