+ Reply to Thread
Results 1 to 4 of 4

Code to Print ranges based on a cell's valvue

  1. #1
    Registered User
    Join Date
    04-15-2009
    Location
    morristown, ny
    MS-Off Ver
    Excel 2007
    Posts
    39

    Code to Print ranges based on a cell's valvue

    On the attached sheet I would like to set the print range and then print based on 1 cell's valve.

    F9 is the value I would like to use:

    If F9=1 I need it to print A1:M43

    If F9=2 I need it to print A1:M87

    If F9=3 I need it to print A1:M131 and so on.


    Any help would be excellent!
    Attached Files Attached Files
    Last edited by ed ayers315; 11-08-2009 at 05:14 PM. Reason: To say thanks to all!!!

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Code to Print ranges based on a cell's valvue

    Try this:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,960

    Re: Code to Print ranges based on a cell's valvue

    Or, perhaps:
    Please Login or Register  to view this content.
    Ben Van Johnson

  4. #4
    Registered User
    Join Date
    04-15-2009
    Location
    morristown, ny
    MS-Off Ver
    Excel 2007
    Posts
    39

    Smile Re: Code to Print ranges based on a cell's valvue

    These suggestions solved my need, this is a great day.

+ 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