+ Reply to Thread
Results 1 to 2 of 2

Auto page setup/row height adjust

  1. #1
    Forum Contributor
    Join Date
    09-04-2013
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    117

    Auto page setup/row height adjust

    Hi, thanks in advance for any advice or assistance submitted.

    So i have invoice, purchase order and quotation templates that i made some time ago. They all have some quirky little macros within (mostly from input from this forum) that really help speed up the filling out process of each document. The problem is i built these templates to stay within the custom margins of a single page, now things have changed since then an I'm constantly now needing a second page for extra line items of which each time i have to insert additional rows, make sure autosum for totals at thee bottom still work etc etc. I end up spending far too long tweaking the document so that it becomes printer friendly and its becoming a nuisance!

    The data, including borders, font etc which sits within 4 adjacent rows must be at the bottom of the last page no matter how many pages in the document are eventually created. These rows/cells contain formulas so must still be able to calculate totals etc no matter where they sit in the document.

    Our services can sometimes be quite bespoke and as such sometimes the cell in each row that contains the service description will often require 2, 3, 4 or maybe 5 lines of text. this then means the row heights need manually adjusting which then pushes my 4 rows of data at the bottom around and i have to spend ages readjusting the layout. is there a way 2 do this =If(text in column C, lines of text = 1 then row height = 19.50, lines of text =2 then row height = 32.75, lines of text =3 then row height =46.50 etc etc

    I guess then any rows between the last line of inputted data and the bottom 4 formula rows that remain blank need to be automatically hidden to reduce the pages to the minimum required before finally placing the 4 rows of formulas at the bottom of the last page.

    Hope this makes sense.

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Auto page setup/row height adjust

    Please Login or Register  to view this content.
    This is what you'd do, have a look at some articles on google about looping ranges in VBA, this will give you what you want then. Then you can do your if statement.
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Auto adjust height in a cell
    By Treecko in forum Excel General
    Replies: 4
    Last Post: 12-19-2013, 08:51 PM
  2. [SOLVED] Macro to auto adjust row height
    By Unnati in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-25-2012, 07:07 AM
  3. Excel 2007 : Auto-adjust row height on VLOOKUP?
    By cornishdave in forum Excel General
    Replies: 6
    Last Post: 07-03-2012, 09:34 AM
  4. Setting Row Height Along with Auto Adjust
    By lwolsiffer in forum Excel General
    Replies: 0
    Last Post: 11-03-2010, 04:53 PM
  5. auto adjust row height
    By maacmaac in forum Excel General
    Replies: 2
    Last Post: 03-14-2007, 05:54 PM

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