Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Gliederung in Excel?

Empfohlene Antworten

Veröffentlicht

hallo leute!

folgendes problem stellt mich als vba noob vor grosse probleme.

ich habe hier eine tabelle mit mehreren spalten.

mehrere zeilen haben jeweils den wert in einer spalte gemeinsam.

nun soll folgendes passieren:

per vba sollen alle zeilen durchsucht werden und es soll automatisch eine trennlinie eingefügt werden wenn ein block vorbei ist ,also wenn in einer spalte ein anderer wert kommt.hoffe ich hab mich verständlich ausgedrückt.

optisch sieht das so aus in etwa:

1 3 1232 1223 1233

3 8 1232 2324 2323

4 2 1232 3223 2342

-----------------------------

3 3 2353 2323 2323

usw

so soll die trennlinie rein. also praktisch dann ,wenn der wert in der 3. spalte sich ändert.

hoffe einer kann mir helfen

grüsse

Hias

Also ist das ganze schon richtig geordnet?

hiho!

ist schon richtig geordnet! muss nur ein strich rein.

das wars dann schon. leider hab ich kein plan wie das geht.

grüsse

hias


Dim strLast As String

Dim i As Integer


strLast = Tabelle1.Cells(1, 1)


i = 2


Do While Tabelle1.Cells(i, 1) <> ""

  If strLast <> Tabelle1.Cells(i, 1) Then

    Rows(i - 1 & ":" & i - 1).Select

    Selection.Borders(xlDiagonalDown).LineStyle = xlNone

    Selection.Borders(xlDiagonalUp).LineStyle = xlNone

    Selection.Borders(xlEdgeLeft).LineStyle = xlNone

    Selection.Borders(xlEdgeTop).LineStyle = xlNone

    With Selection.Borders(xlEdgeBottom)

        .LineStyle = xlContinuous

        .Weight = xlMedium

        .ColorIndex = xlAutomatic

    End With

    Selection.Borders(xlEdgeRight).LineStyle = xlNone

    Selection.Borders(xlInsideVertical).LineStyle = xlNone

  End If

  strLast = Tabelle1.Cells(i, 1)

  i = i + 1

Loop

sollte was unklar sein frag ruhig...

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.