×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Print many instances of a single chart in a single worksheet
3

Print many instances of a single chart in a single worksheet

Print many instances of a single chart in a single worksheet

(OP)
I have a table whose y-values are determined from a small set of user input. I have created a graph for this table in the same Excel worksheet.

Now

I have at least 20 similar sets of input. Obviously I can enter them one after the other and PRINT

I dont want to do this

I want to store my input set in another worksheet. Call this a data sheet.

And put a button in my main worksheet to calculate the table and store them somewhere.

Finally add a PRINT button which will simply get the tables in memory one by one, create graph as if on the same worksheet, print the worksheet(graph) one after the other


I will appreciate basic hints and even a few basic lines of code.

Thanks,IJR

RE: Print many instances of a single chart in a single worksheet

Just off the cuff, assuming this is a one-off activity, I'd suggest a macro.  Setup your spread sheets.  Turn the macro recorder on go through the steps you want it to do.  Turn off the macro.  Edit the macro to go to the next line of input by using a FOR-NEXT loop,

i.e.

Dim Found, MyObject, MyCollection
Found = False    ' Initialize variable.
For Each MyObject In MyCollection    'Iterate through each
    If MyObject.Text = "Hello" Then    
        Found = True    ' Set Found to True.
        Exit For    ' Exit loop.
    End If

    'CHANGE VALUES
    'DO CALCULATIONS
    'PRINT GRAPH
Next


Hope this helps,



 Imagineer
 
 
 

RE: Print many instances of a single chart in a single worksheet

Imagineer has presented the correct mechanism,  but I think IJR must be wanting something more specific. I suggest the following:
1.    I presume the Input data sets are contained in a sheet named 'InputDat', arranged in rows (e.g. 20 rows of 5 parameters each) and the top left cell of this range (containing the first i.e. leftmost parameter in the first row) has been named 'InputCell1'.
2.    The cells which calculate the y-values for the chart are named 'ChartInput'.
3.    The idea is to refer to the values from the InputDat sheet to the ChartInput range one by one and print the chart for each input set.
4.    Since I find this easier to do than to describe, I've spent a half-hour preparing a workbook to do your thing – this has been done in a generalized form. U can ask for this from mala_rs_singh@rediffmail.com.
Mala

RE: Print many instances of a single chart in a single worksheet

(OP)
Coool stuff Mala. Dont keep away from the forum

IJR

RE: Print many instances of a single chart in a single worksheet

Hi, IJR
I am used to be 4928...

In a fact you don't need to use VBA to accomplish this task. Instead you can use dynamic ranges and array formulas. It's easier to accomplish than to explain, it's very short and straight forward if you know how to name ranges using formulas and how to use the 'offset' function. See the solution at http://yakpol.net/downloads ; File name: DynamicChart.xls

Bye

RE: Print many instances of a single chart in a single worksheet

The previos post link to the site does not work, try it here
http://yakpol.net/downloads/

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close