'估计是这意思,就是打印时3户一单元放在一张纸上是吧
'不过打印时还要设置一下打印标题区域的
Option Explicit
Sub abc()
Dim i, n, row
With ActiveSheet
.ResetAllPageBreaks
row = .Cells(Rows.Count, "b").End(xlUp).row + 1
For i = 2 To row - 1
If .Cells(i, "b") <> .Cells(i + 1, "b").Value Or i = row - 1 Then
n = n + 1
If n = 3 Or i = row - 1 Then
.HPageBreaks.Add Before:=.Cells(i + 1, "a")
n = 0
End If
End If
Next
End With
End Sub