Thema Datum  Von Nutzer Rating
Antwort
04.05.2022 12:01:48 xxja
NotSolved
04.05.2022 13:25:26 Gast01287
NotSolved
Rot Einfügen eines bestimmten Zelleninhalts unter bstimmtem Wort
04.05.2022 14:18:46 Gast20146
NotSolved
04.05.2022 14:20:54 Gast01287
NotSolved
04.05.2022 14:31:51 Gast16030
NotSolved
04.05.2022 14:39:22 Gast01287
NotSolved
04.05.2022 14:42:14 Gast61522
NotSolved
04.05.2022 14:43:53 Gast01287
NotSolved
04.05.2022 14:48:37 Gast47239
NotSolved
04.05.2022 15:18:50 Gast01287
Solved

Ansicht des Beitrags:
Von:
Gast20146
Datum:
04.05.2022 14:18:46
Views:
582
Rating: Antwort:
  Ja
Thema:
Einfügen eines bestimmten Zelleninhalts unter bstimmtem Wort

Das hier ist mein Code:

Sub Insertrowbelow()
'updateby Extendoffice
Worksheets("Budgetplanung").Activate
    Dim i As Long
    Dim xLast As Long
    Dim xRng As Range
    Dim xTxt As String
    On Error Resume Next
    xTxt = Application.ActiveWindow.RangeSelection.Address
    Set xRng = Application.InputBox("Bitte Spalte auswählen, in die die Leerzeilen eingefügt werden sollen:", "Kutools for Excel", xTxt, , , , , 8)
    If xRng Is Nothing Then Exit Sub
    If (xRng.Columns.Count > 1) Then
        MsgBox "Bitte wählen Sie maximal eine Spalte aus", , "Kutools for Excel"
        Exit Sub
    End If
    xLast = xRng.Rows.Count
    For i = xLast To 1 Step -1
      If InStr(1, xRng.Cells(i, 1).Value, "Paket") > 0 Then
        Rows(xRng.Cells(i + 1, 1).Row).Insert Shift:=xlDown
        End If
        If InStr(1, xRng.Cells(i, 1).Value, "Paket") > 0 Then
        Rows(xRng.Cells(i + 1, 1).Row).Insert Shift:=xlDown
        End If
        If InStr(1, xRng.Cells(i, 1).Value, "Paket") > 0 Then
        Rows(xRng.Cells(i + 1, 1).Row).Insert Shift:=xlDown
        End If
        If InStr(1, xRng.Cells(i, 1).Value, "Paket") > 0 Then
        Rows(xRng.Cells(i + 1, 1).Row).Insert Shift:=xlDown
        End If
        If InStr(1, xRng.Cells(i, 1).Value, "Paket") > 0 Then
        Rows(xRng.Cells(i + 1, 1).Row).Insert Shift:=xlDown
        End If
        If InStr(1, xRng.Cells(i, 1).Value, "Paket") > 0 Then
        Rows(xRng.Cells(i + 1, 1).Row).Insert Shift:=xlDown
        End If
        If InStr(1, xRng.Cells(i, 1).Value, "Paket") > 0 Then
        Rows(xRng.Cells(i + 1, 1).Row).Insert Shift:=xlDown
        End If
    
    Next
End Sub
 

Wo würde ich das mit eintragen, wenn ich direkt in den Leerzeilen die Kostenart miteingefügt haben möchte?


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.05.2022 12:01:48 xxja
NotSolved
04.05.2022 13:25:26 Gast01287
NotSolved
Rot Einfügen eines bestimmten Zelleninhalts unter bstimmtem Wort
04.05.2022 14:18:46 Gast20146
NotSolved
04.05.2022 14:20:54 Gast01287
NotSolved
04.05.2022 14:31:51 Gast16030
NotSolved
04.05.2022 14:39:22 Gast01287
NotSolved
04.05.2022 14:42:14 Gast61522
NotSolved
04.05.2022 14:43:53 Gast01287
NotSolved
04.05.2022 14:48:37 Gast47239
NotSolved
04.05.2022 15:18:50 Gast01287
Solved