• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to repeat a row

Rashmita sahu

New Member
Hi,

I want to repeat rows at the bottom of an excel sheet. what's the way out to repeat rows at the bottom of each excel sheet without putting that in footer.

Regards,
Rashmita
 
try this one.

Code:
Sub MyFooter()
    Dim xTxt As String
    Dim xAddress As String
    Dim xRg As Range
    Dim xCell As Range
    On Error Resume Next
    xAddress = ActiveWindow.RangeSelection.Address
    Set xRg  = Application.InputBox("Select the row you will insert repeatedly at the bottom:", "Excel is Fun", xAddress, , , , , 8)
    If xRg Is Nothing Then Exit Sub
        For Each xCell In xRg
            xTxt = xTxt & xCell.Value & " "
        Next
        ActiveSheet.PageSetup.LeftFooter = xTxt
    End Sub

once u run it will ask the row which u want to repeat at bottom .. select that row and go ahead.
 
Last edited by a moderator:
try this one.

Sub MyFooter()
Dim xTxt As String
Dim xAddress As String
Dim xRg As Range
Dim xCell As Range
On Error Resume Next
xAddress = ActiveWindow.RangeSelection.Address
Set xRg = Application.InputBox("Select the row you will insert repeatedly at the bottom:", "Excel is Fun", xAddress, , , , , 8)
If xRg Is Nothing Then Exit Sub
For Each xCell In xRg
xTxt = xTxt & xCell.Value & " "
Next
ActiveSheet.PageSetup.LeftFooter = xTxt
End Sub


once u run it will ask the row which u want to repeat at bottom .. select that row and go ahead.
Nope, it's not working.
 
Rashmita sahu
I want to repeat rows at the bottom of an excel sheet.
... there are 1048576 rows in an excel sheet. It would be better to upload a sample file to see - where do You would like to get those 'repeat a row'-functionality.
 
Rashmita sahu
I want to repeat rows at the bottom of an excel sheet.
... there are 1048576 rows in an excel sheet. It would be better to upload a sample file to see - where do You would like to get those 'repeat a row'-functionality.

Hi,

Please find the enclosed sample file, i want to repeat the highlighted (yellow) rows at the bottom of each page without putting them in the footer.
 

Attachments

  • Sample File.xlsx
    14.1 KB · Views: 8
Rashmita sahu
That's true!
So far, You've written about sheet ... sheet ... sheet.
Now, You start to write about page ... page ... page.
Those are different!
And as I wrote ... You want a formula solution.
This would be possible to with VBA
if and if and if could get correct information and ... those pages are eg fixed length...
 
Rashmita sahu
That's true!
So far, You've written about sheet ... sheet ... sheet.
Now, You start to write about page ... page ... page.
Those are different!
And as I wrote ... You want a formula solution.
This would be possible to with VBA
if and if and if could get correct information and ... those pages are eg fixed length...

My bad!!

Please keep posted, if you're getting the solution.

Thanks :)
 
Rashmita sahu
You even didn't confirm is there always 86 rows data.
Is it matter if some page are zoomed ... hmm?
What size of paper? ... with A3 or bigger there would be more possibilities.
I could try to do this if I have FREE hand ... but would it be useful ... hmm?
You should know some facts!
 
Rashmita sahu
You even didn't confirm is there always 86 rows data.
Is it matter if some page are zoomed ... hmm?
What size of paper? ... with A3 or bigger there would be more possibilities.
I could try to do this if I have FREE hand ... but would it be useful ... hmm?
You should know some facts!


The row range may vary somewhere from 56 to 1000 nos and I need to print that doc in A3 size only.
 
Rashmita sahu
This is a sample for Rashmita sahu.
It will create PDF from this file.
> one page has 79 rows - including those 'five like footer rows'.
NOW - that 'footer-range' is in that place!
Press [ Do PDF ]-button and
after it will give message - check created PDF in same folder as Excel-file.
 

Attachments

  • Sample File.xlsb
    17.6 KB · Views: 28
Rashmita sahu
This is a sample for Rashmita sahu.
It will create PDF from this file.
> one page has 79 rows - including those 'five like footer rows'.
NOW - that 'footer-range' is in that place!
Press [ Do PDF ]-button and
after it will give message - check created PDF in same folder as Excel-file.

Hey Man!!
Its working
How you did this, can u please help me with the code details.
 
Rashmita sahu
I repeated those like 'footer rows' in end of every page as You finally could wrote.

Usage:
1) Upload again that my sent file
2) Copy its Do_It-code to Your original working sheet as in 'my sent file'
3) Create 'footer rows' as in 'my sent file'
4) Verify that other page settings are as in 'my sent file'
5) Run 'Do_It'-macro as You want.
 
Rashmita sahu
I repeated those like 'footer rows' in end of every page as You finally could wrote.

Usage:
1) Upload again that my sent file
2) Copy its Do_It-code to Your original working sheet as in 'my sent file'
3) Create 'footer rows' as in 'my sent file'
4) Verify that other page settings are as in 'my sent file'
5) Run 'Do_It'-macro as You want.

It's bouncing on top of my head. I'm unable to do this. I'm really in need of this.

Can you please simplify your reply. My original working document is 79 pages (1 sheet=79 page) where I want to repeat a few rows in every page and the other, at the bottom.

Please, update the stepwise process. I'm running from pillar to post for the solution
 
Rashmita sahu
Those needs to do!
hmm? My original working document is 79 pages (1 sheet=70 page)
Do You write about Excel-file?
Which has at least one sheet?
Which has ... many rows data?
... Is there 79 pages or how many depends of many settings!
... hmm? 1 sheet = 70 page ... so far, You have had sheets and pages same or different or someway ...
You haven't written nothing about the Legend...
I can help or try to help ONLY with details which You give!
... and I expect that Your Sample File has same features as Your original file
... if not ... then You'll have self made challenge!

1) Upload again that my sent file ... after done, write reply.
 
Rashmita sahu
Those needs to do!
hmm? My original working document is 79 pages (1 sheet=70 page)
Do You write about Excel-file?
Which has at least one sheet?
Which has ... many rows data?
... Is there 79 pages or how many depends of many settings!
... hmm? 1 sheet = 70 page ... so far, You have had sheets and pages same or different or someway ...
You haven't written nothing about the Legend...
I can help or try to help ONLY with details which You give!
... and I expect that Your Sample File has same features as Your original file
... if not ... then You'll have self made challenge!

1) Upload again that my sent file ... after done, write reply.
one excel file, in a single sheet with many rows. whenever I'm setting into page break it becomes 79 pages. In a sum its a 1 excel file, 1 sheet and the page break preview is 79 pages. (hope its clear)
 
Rashmita sahu
Great that #1 step has done - You wrote reply!

Why do You now write about some page breaks?
So far, there has been many rows ... which would start from row 1 and continue as long as there are rows.
If You try to use any manually set page breaks ... then I'll clear those away (with next version!)

2) Copy its Do_It-code to Your original working sheet as in 'my sent file' ... after done, write reply.
 
Rashmita sahu
If ... as seems ... plan A has some challenges
then You could try plan B...
1) Open both files - Your original and my-made files
2) From Your original file ... select columns A-J >> press Ctrl+C (copy)
3) activate 'my-made' file
4) select cell A1
5) press Ctrl+V (paste)
6) save file
7) close the original file
9) modify as needed that 'yellow like footer range'
=> Ready
 
Back
Top