Například nějak takto:
Sub Oddelit_prazdnym_radkem()
Dim sloupec_kriteria As Integer
Dim i As Long
sloupec_kriteria = 4
For i = 1 To 1000
If (Cells(i, sloupec_kriteria) <> Cells(i + 1, sloupec_kriteria)) And _
(Cells(i, sloupec_kriteria) <> "") And _
(Cells(i + 1, sloupec_kriteria) <> "") Then
Cells(i + 1, sloupec_kriteria).EntireRow.Insert
Rows(i + 1).RowHeight = 4.8
Range(Cells(i + 1, 1), Cells(i + 1, 6)).Interior.ColorIndex = 15
i = i + 1
End If
Next i
End SubP.
Viz příloha:
Sub Oddelit_prazdnym_radkem()
Dim sloupec_kriteria As Integer
Dim i As Long
sloupec_kriteria = 4
For i = 1 To 1000
If (Cells(i, sloupec_kriteria) <> Cells(i + 1, sloupec_kriteria)) And _
(Cells(i, sloupec_kriteria) <> "") And _
(Cells(i + 1, sloupec_kriteria) <> "") Then
Cells(i + 1, sloupec_kriteria).EntireRow.Insert
Rows(i + 1).RowHeight = 4.8
Range(Cells(i + 1, 1), Cells(i + 1, 6)).Interior.ColorIndex = 15
i = i + 1
End If
Next i
End SubP.
Viz příloha:
Příloha: 32589_test_reseni.zip (15kB, staženo 22x)
citovat