Seitenumbruch
01.10.2005 12:40:46
Michael
ich habe ein Problem mit dem Seitenumbruch. ich möchte nur eine bestimmte Anzahl an Zeilen pro Blatt haben. Da ich ein Makro für den Druckbereich geschrieben habe, in dem Excel alle leeren Datenfelder ausblendet brauche ich diese Möglichkeit, damit de Audruck nicht unmöglich aussehen.
DAnke für eure Hilfe.
Gruß
Michael
Sub druckbereich()
If Cells(4, 1) = "" Then
Rows("4:9").Select
Selection.EntireRow.Hidden = True
End If
If Cells(10, 1) = "" Then
Rows("10:15").Select
Selection.EntireRow.Hidden = True
End If
If Cells(16, 1) = "" Then
Rows("16:21").Select
Selection.EntireRow.Hidden = True
End If
If Cells(22, 1) = "" Then
Rows("22:27").Select
Selection.EntireRow.Hidden = True
End If
If Cells(28, 1) = "" Then
Rows("28:33").Select
Selection.EntireRow.Hidden = True
End If
If Cells(34, 1) = "" Then
Rows("34:39").Select
Selection.EntireRow.Hidden = True
End If
If Cells(40, 1) = "" Then
Rows("40:45").Select
Selection.EntireRow.Hidden = True
End If
If Cells(46, 1) = "" Then
Rows("46:51").Select
Selection.EntireRow.Hidden = True
End If
If Cells(52, 1) = "" Then
Rows("52:57").Select
Selection.EntireRow.Hidden = True
End If
If Cells(58, 1) = "" Then
Rows("58:63").Select
Selection.EntireRow.Hidden = True
End If
If Cells(64, 1) = "" Then
Rows("64:69").Select
Selection.EntireRow.Hidden = True
End If
If Cells(70, 1) = "" Then
Rows("70:75").Select
Selection.EntireRow.Hidden = True
End If
If Cells(76, 1) = "" Then
Rows("76:81").Select
Selection.EntireRow.Hidden = True
End If
If Cells(82, 1) = "" Then
Rows("82:87").Select
Selection.EntireRow.Hidden = True
End If
If Cells(88, 1) = "" Then
Rows("88:93").Select
Selection.EntireRow.Hidden = True
End If
If Cells(94, 1) = "" Then
Rows("94:99").Select
Selection.EntireRow.Hidden = True
End If
If Cells(100, 1) = "" Then
Rows("100:105").Select
Selection.EntireRow.Hidden = True
End If
If Cells(106, 1) = "" Then
Rows("106:111").Select
Selection.EntireRow.Hidden = True
End If
If Cells(112, 1) = "" Then
Rows("112:117").Select
Selection.EntireRow.Hidden = True
End If
If Cells(118, 1) = "" Then
Rows("118:123").Select
Selection.EntireRow.Hidden = True
End If
If Cells(124, 1) = "" Then
Rows("124:129").Select
Selection.EntireRow.Hidden = True
End If
If Cells(130, 1) = "" Then
Rows("130:135").Select
Selection.EntireRow.Hidden = True
End If
If Cells(136, 1) = "" Then
Rows("136:141").Select
Selection.EntireRow.Hidden = True
End If
If Cells(142, 1) = "" Then
Rows("142:147").Select
Selection.EntireRow.Hidden = True
End If
If Cells(148, 1) = "" Then
Rows("148:153").Select
Selection.EntireRow.Hidden = True
End If
If Cells(154, 1) = "" Then
Rows("154:159").Select
Selection.EntireRow.Hidden = True
End If
ActiveSheet.PageSetup.PrintArea = "a4:AJ159"
End Sub