+ Reply to Thread
Results 1 to 12 of 12

Formatting Output

  1. #1
    Registered User
    Join Date
    01-27-2010
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    20

    Formatting Output

    Hi all

    I am using Excel 2007.

    I have a simple spreadsheet with fields (columns) for First Name, Last Name, Address, State, phone, etc. I want to produce a list from this data in the following format:

    John Smith
    123 Hay Street
    Melbourne
    Victoria
    Phone 03 9999 9999

    with about 10 of these entries per page.

    I know that I could do this in Access with a report, but can I do this in Excel? If so, how?

    Alternatively, can I do it in Word? I know I could use Mail Merge if I wanted only one entry per page, (as if I was printing envelopes) but is there a way to do this and get 10 entries in a list on a page?

    Thanks in advance for any assistance.

    Robert
    Last edited by RobertWA; 03-30-2010 at 02:58 AM.

  2. #2
    Forum Contributor
    Join Date
    04-07-2009
    Location
    Rowley
    MS-Off Ver
    Excel 2007
    Posts
    326

    Re: Formatting Output

    You can use the Paste Special, Transpose function.

    If your data is in Columns like:

    Please Login or Register  to view this content.

    Then:
    On the Task Bar
    Edit
    Copy - your name row from A to F

    Next, move to an open Cell/Column like H1
    Then:
    On Task Bar
    Edit
    Past Special
    Select Transpose, it's at the bottom.

    Your name in column H should now be in the form:
    H
    John
    Smith
    23 Hay Street
    Melbourne
    Victoria
    3 9999 9999
    Last edited by xenixman; 03-25-2010 at 11:55 PM.

  3. #3
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: Formatting Output

    Assuming you are expecting to keep the table as it is then:
    1. on a new sheet (for preference)
    2. Select column A and set the format to WRAP TEXT and make the column wide enough for your longest line
    3. format each address into a single cell using =CONCATENATE(Data!A1,CHAR(10),Data!B1,CHAR(10),Data!C1,CHAR(10),Data!D1)

    where the sheet containg the table is "Data" and A1 contains the first value.
    Extend the Concatenate statement for as many cells as needed.
    The CHAR(10) makes the text on a new line (not a new cell)

    Copy the formula down.

    On the Page Setup tab make sure Gridlines...Page is ticked.

    You can now see where the page breaks are.

    adjust the : text size, cell size etc to get 12 to a page

    hope this helps



    click on the * Add Reputation if this was useful or entertaining.

  4. #4
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: Formatting Output

    and a sample attached
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    04-29-2008
    Location
    Tennessee
    MS-Off Ver
    2007
    Posts
    37

    Re: Formatting Output

    If you wish to place each item in a different cell, open this workbook, and copy and paste the formula that is in I2. (Do not paste in the top row) Then copy down.
    Attached Files Attached Files
    Last edited by Rebuild8; 03-26-2010 at 10:52 AM.

  6. #6
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: Formatting Output

    Rebuild8,

    I was looking at your solution and thought I would add a couple of alternatives for interest.

    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    04-29-2008
    Location
    Tennessee
    MS-Off Ver
    2007
    Posts
    37

    Re: Formatting Output

    Cool! I knew when I was typing all that that there HAD to be a shorter way! (nothing drives me battier than a bunch of nested IF statements)

  8. #8
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: Formatting Output

    Glad you liked it.


  9. #9
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Formatting Output

    without offset use in row 1
    =IF(MOD(ROW(),7)=0,"",INDEX(A:F,CEILING(ROW()/7,1),MOD(ROW(),7)))
    Last edited by martindwilson; 03-26-2010 at 08:12 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  10. #10
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: Formatting Output

    Hi,

    I have collected all the options (so far) into one sample book (attached). I'd be interested to know which one you go for.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    01-27-2010
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Formatting Output

    Thank you all for your assistance. Over the next few days I'll look at these solutions and try to decide which one suits my needs best.

    Thanks again.

    Robert

  12. #12
    Registered User
    Join Date
    01-27-2010
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Formatting Output

    Deleted -- started new thread

    Robert
    Last edited by RobertWA; 11-03-2010 at 10:00 PM. Reason: Started new thread

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1