Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

A way to set print areas by code? 1

Status
Not open for further replies.

IJR

Structural
Dec 23, 2000
774

I just thought of something. Imagine a large spreadsheet with blocks of calculations, each of which produces results necessary for the results of succeeding blocks. Say if upper blocks find pressure in vessel to exceed a certain limit, then the next blocks either proceed accordingly or simply should not be executed and should be printed. It is the next case which interests me. I want to hide out all succeeding blocks of cells from the sheet and dont want these blocks to print.

Thanks in advance.
 
Replies continue below

Recommended for you

Try using Insert - Name(Range back in Lotus times) - Create or Define. When you are ready to print, just select the range you want to print, Edit - GoTo, then File - Print - Selection.
 
I like to use the filter feature for this type of situation. Insert a column "A" for your filter. Then go through the spreadsheet and enter a "1" if you want to print the line, and a blank if you do not. You can even use condition statements to determine if you will or will not print. For example, if the vessel exceeds the allowable stress then print a "1" otherwise print a blank "". Then you apply a filter to column "A" to print all non-blank lines. You can even automate this within a macro.

I use this in almost all of the spreadsheets I write. You can download some demos at which use this method.

Good Luck,

Chris Rosencutter, P.E.
 
Thanks meca

It would have taken me months to discover that filter utility.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor