+ Reply to Thread
Results 1 to 7 of 7

Solved: Formatting Cells within Print Range

  1. #1
    Registered User
    Join Date
    11-07-2012
    Location
    Orlando, FL
    MS-Off Ver
    Excel 2007, 2010, 2011
    Posts
    9

    Solved: Formatting Cells within Print Range

    Hello, I am looking for help with macro to format and resize cells in a print range. I would like to have a macro that asks the user to input "n" number of rows they need in the workbook, starting the rows on row 10(Rows 1-9 are repeat tiles). I would like to have this as a pop up window or be able to insert the number of rows in a cell and then click and button and it takes that number.

    Then, the inserted rows would be resized to match row 10. Lastly, the print area would have to be updated to print n+1 rows because I have a border in the surrounding cells.

    Please let me know if this is possible and how to do it, I am new to vba and macros as I am trying to learn.

    I am using Excel for Mac 2011 and also Excel for Windows 2007, and 2010. Any help would be appreciated.
    Last edited by bcap; 11-08-2012 at 12:51 PM.

  2. #2
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Formatting Cells within Print Range

    Post a workbook and show the before and after results if you can.
    Be fore warned, I regularly post drunk. So don't take offence (too much) to what I say.
    I am the real 'Napster'
    The Grid. A digital frontier. I tried to picture clusters of information as they moved through the computer. What did they look like? Ships? motorcycles? Were the circuits like freeways? I kept dreaming of a world I thought I'd never see. And then, one day...

    If you receive help please give thanks. Click the * in the bottom left hand corner.

    snb's VBA Help Files

  3. #3
    Registered User
    Join Date
    11-07-2012
    Location
    Orlando, FL
    MS-Off Ver
    Excel 2007, 2010, 2011
    Posts
    9

    Re: Formatting Cells within Print Range

    Attached are two workbooks, workbook "before" has one row in the print range with the correct size and formatting. Workbook "after" has 600 rows in the print range with the correct size and formatting. I want to make a button outside the print range lets say in cell o5 that reads cell o4 where the user can put the number of rows they need. In the case of before and after it would be 600. In doing this, i would like the print range too update to the new rows.
    Attached Files Attached Files

  4. #4
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Formatting Cells within Print Range

    Try this,

    This will not delete rows for you.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    11-07-2012
    Location
    Orlando, FL
    MS-Off Ver
    Excel 2007, 2010, 2011
    Posts
    9

    Re: Formatting Cells within Print Range

    Japan Dave,
    Macro works beautifully and its exactly what I need it to do, the only thing is if you hit the cancel or exit button it reads a mismatch error. Seems to be missing a line of code.

  6. #6
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Formatting Cells within Print Range

    Try this,

    Dave
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    11-07-2012
    Location
    Orlando, FL
    MS-Off Ver
    Excel 2007, 2010, 2011
    Posts
    9

    Re: Formatting Cells within Print Range

    Awesome, thank you so much

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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