Thema Datum  Von Nutzer Rating
Antwort
01.07.2019 10:56:23 vukadonis
NotSolved
01.07.2019 11:25:25 Werner
*****
NotSolved
01.07.2019 13:20:14 Gast9275
NotSolved
02.07.2019 08:56:38 vukadonis
NotSolved
02.07.2019 09:56:59 Werner
NotSolved
Blau Zeile in bestimmte Zeile reinkopieren
01.07.2019 21:06:23 vukadonis
NotSolved
01.07.2019 21:24:46 Werner
*****
NotSolved
02.07.2019 09:52:18 Gast97527
NotSolved

Ansicht des Beitrags:
Von:
vukadonis
Datum:
01.07.2019 21:06:23
Views:
458
Rating: Antwort:
  Ja
Thema:
Zeile in bestimmte Zeile reinkopieren

Werner danke nochmals,

habe es jetzt so gelöst, bitte nicht steinigen.

würde mich aber freuen es zu erfahren wie es richtig gemacht wird mit weniger code.

 

Public Sub Kopieren()
Dim loLetzte As Long, raFund As Range
Application.ScreenUpdating = False
 
With ActiveSheet
    loLetzte = .Cells(.Rows.Count, "A").End(xlUp).Row
    Set raFund = .Range("A19:A" & loLetzte).Find(what:="Spannmittel", LookIn:=xlValues, lookat:=xlWhole)
    If Not raFund Is Nothing Then
        .Range("A19:K19").Copy
        Rows(raFund.Row).Insert
        Application.CutCopyMode = False
        Range("A" & raFund.Row - 1 & ":" & "K" & raFund.Row - 1).ClearContents
        Range("A19:K" & raFund.Row - 1).Select
        With Selection.Borders(xlEdgeLeft)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.Borders(xlEdgeRight)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.Borders(xlInsideVertical)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.Borders(xlInsideHorizontal)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
    Selection.Borders(xlDiagonalDown).LineStyle = xlNone
    Selection.Borders(xlDiagonalUp).LineStyle = xlNone
    With Selection.Borders(xlEdgeLeft)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlMedium
    End With
    With Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlMedium
    End With
    With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlMedium
    End With
    With Selection.Borders(xlEdgeRight)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlMedium
    End With
    With Selection.Borders(xlInsideVertical)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.Borders(xlInsideHorizontal)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
    End If
End With
Range("A" & raFund.Row - 1).Select
Application.ScreenUpdating = True
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
01.07.2019 10:56:23 vukadonis
NotSolved
01.07.2019 11:25:25 Werner
*****
NotSolved
01.07.2019 13:20:14 Gast9275
NotSolved
02.07.2019 08:56:38 vukadonis
NotSolved
02.07.2019 09:56:59 Werner
NotSolved
Blau Zeile in bestimmte Zeile reinkopieren
01.07.2019 21:06:23 vukadonis
NotSolved
01.07.2019 21:24:46 Werner
*****
NotSolved
02.07.2019 09:52:18 Gast97527
NotSolved