Ask Experts Questions for FREE Help !
Ask
    TheStoneCrusher's Avatar
    TheStoneCrusher Posts: 1, Reputation: 1
    New Member
     
    #1

    Mar 27, 2009, 09:31 AM
    Create Index by wrapping columns (multi page)
    I am trying to create a 'book' for karaoke. I have a program that will allow me to read file names into Excel.

    The file names contain two columns: one for song title, and one for artist. The problem is that it will be close to 70 pages (10pts). If I could convert with wrap or something to four columns on a page it would be a great help.

    I looked at other postings by people who were trying to get two pages into one. Their solutions did not work for me. Can you help? I am using Excel 2002.

    Goodwill,
    Luke
    JBeaucaire's Avatar
    JBeaucaire Posts: 5,426, Reputation: 997
    Software Expert
     
    #2

    Mar 27, 2009, 10:38 AM

    This macro will parse your data in columns A/B into fourths and place in columns D/E, G/H and J/K.
    Code:
    Sub Fourths()
    Dim lastrow As Long, nextend As Long
    lastrow = ActiveSheet.UsedRange.Rows.Count
    nextend = Int(lastrow / 4)
    
        Range("A" & nextend, "B" & nextend * 2).Copy
        Range("D2").PasteSpecial xlPasteAll
        Range("A" & nextend, "B" & nextend * 2).Delete Shift:=xlUp
        
        Range("A" & nextend, "B" & nextend * 2).Copy
        Range("G2").PasteSpecial xlPasteAll
        Range("A" & nextend, "B" & nextend * 2).Delete Shift:=xlUp
        
        Range("A" & nextend, "B" & nextend * 2).Copy
        Range("J2").PasteSpecial xlPasteAll
        Range("A" & nextend, "B" & nextend * 2).Delete Shift:=xlUp
    End Sub
    Attached is a sample workbook you can test it out on.

    To add the macro to your own workbook:
    1. Press Alt-F11 to open the VBEditor
    2. Click Insert > Module
    3. Paste in the code above
    4. Alt-F11 to close the editor
    5. Save your book
    6. Alt-F8 to see the macro list
    7. Run the macro "Fourths"
    Attached Files
  1. File Type: xls Fourths.xls (151.0 KB, 170 views)

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

From 3 columns of data creating a 4th column with the most recent columns data [ 2 Answers ]

Hello, I was wondering if anyone can help with an excel query I have... I have 3 columns of information and want to summarise the most recent information in to a 4th column. i.e. the most up to date information. If the most recent column is blank use the information from the 2nd most recent...

How do I split a multi page PDF into individual PDFs? [ 4 Answers ]

Can this be done with Adobe Reader 8?

Flash does not work on my index page [ 4 Answers ]

I have been designing a website using dreamweaver which incorporates flash. When I view the site in preview everything works perfectly. I have uploaded to the server and the flash works perfectly on some pages but not on the index page where it doesn't show at all. I have tried changing...

Home page --> res://qsryz.dll/index.html#37049 [ 4 Answers ]

I downloaded Spybot and got rid of various spy stuff. I had the DSO Exploit thingy and fixed it according to alicka. However, my original problem exists:  My home page gets reset to res://qsryz.dll/index.html#37049 every time I leave the internet.   What is this and how do I get rid of it?...


View more questions Search