I had worked on this sheet a few weeks ago, not sure where i went wrong.
Columns A-c are all one, D-O all one P-V are all one. What I'm trying to say is this:
<tbody>
</tbody>
I am supposed to have information in A B C D E F G. Instead each column each first columns information. Where did i go wrong. It does have a macro to add page breaks. This is the macro:
Sub AddPageBreaks()
Dim rFoundCell As Range
Dim sFirstAddress As String
Dim lCnt As Long
ActiveSheet.ResetAllPageBreaks
With ActiveSheet.Columns("M")
Set rFoundCell = .Find(what:="MSRP", after:=.Rows(.Rows.Count), LookIn:=xlValues, lookat:=xlWhole, searchdirection:=xlNext, MatchCase:=False)
If Not rFoundCell Is Nothing Then
lCnt = 0
sFirstAddress = rFoundCell.Address
Do
lCnt = lCnt + 1
If lCnt > 1 Then
ActiveSheet.HPageBreaks.Add before:=rFoundCell
End If
Set rFoundCell = .FindNext(rFoundCell)
Loop While rFoundCell.Address <> sFirstAddress
End If
End With
Set rFoundCell = Nothing
End Sub
Any help is appreciated. Thank you
Columns A-c are all one, D-O all one P-V are all one. What I'm trying to say is this:
A B C | D E F G | H I J K |
B770-222 | Dresser | ETC |
<tbody>
</tbody>
I am supposed to have information in A B C D E F G. Instead each column each first columns information. Where did i go wrong. It does have a macro to add page breaks. This is the macro:
Sub AddPageBreaks()
Dim rFoundCell As Range
Dim sFirstAddress As String
Dim lCnt As Long
ActiveSheet.ResetAllPageBreaks
With ActiveSheet.Columns("M")
Set rFoundCell = .Find(what:="MSRP", after:=.Rows(.Rows.Count), LookIn:=xlValues, lookat:=xlWhole, searchdirection:=xlNext, MatchCase:=False)
If Not rFoundCell Is Nothing Then
lCnt = 0
sFirstAddress = rFoundCell.Address
Do
lCnt = lCnt + 1
If lCnt > 1 Then
ActiveSheet.HPageBreaks.Add before:=rFoundCell
End If
Set rFoundCell = .FindNext(rFoundCell)
Loop While rFoundCell.Address <> sFirstAddress
End If
End With
Set rFoundCell = Nothing
End Sub
Any help is appreciated. Thank you