home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / apps / spreadsh / 785 < prev    next >
Encoding:
Text File  |  1992-12-22  |  1.6 KB  |  41 lines

  1. Newsgroups: comp.apps.spreadsheets
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!news.acns.nwu.edu!casbah.acns.nwu.edu!stubaker
  3. From: stubaker@casbah.acns.nwu.edu (Stuart Baker)
  4. Subject: Excel 4.0 : Selecting Extract Data
  5. Message-ID: <1992Dec22.145518.992@news.acns.nwu.edu>
  6. Sender: usenet@news.acns.nwu.edu (Usenet on news.acns)
  7. Nntp-Posting-Host: unseen1.acns.nwu.edu
  8. Organization: Northwestern University, Evanston Illinois.
  9. Date: Tue, 22 Dec 1992 14:55:18 GMT
  10. Lines: 29
  11.  
  12. Thank to those who responded to my inquiry about setting a print area for an
  13. unlimited extract range.  I actually ended up using a compilation of efforts
  14. to do the deed. I have put the macro below. The key command is the
  15. =Select.Special(5) command which is the equivalent of Control & Shift & *,
  16. which selects the current region. The line after that returns the selection
  17. range, minus the top row which is the print title row of the extract range.
  18.  
  19.  
  20. *****EXCEL MACRO TO AUTOMATICALLY SELECT A REGION & DEFINE PRINT AREA & PRINT
  21.  
  22. PrintExtract
  23.         =ECHO(FALSE)
  24. Print_Ext    =ALERT("Do you want to print the extracted data?",1)
  25.         =IF(Print_Ext=FALSE,GOTO(EndExtPrint))
  26.         =MESSAGE(TRUE,Printing Extracted Data, please wait")
  27.         =FORMULA.GOTO("Extract_Home")
  28.         =SELECT.SPECIAL(5)
  29.         =SELECT(OFFSET(SELECTION(),1,0)
  30.         =SET.PRINT.AREA()
  31.         =FORMULA.GOTO("Extract_Home")
  32.         =PRINT()
  33. EndExtPrint    =MESSAGE(FALSE)
  34.         =RETURN()
  35.  
  36. ---------------------
  37. Stu D. Baker                Mitchell Media Center
  38. Multimedia Services Specialist        Northwestern University Library
  39. E-MAIL: stubaker@nwu.edu        1935 Sheridan Road.
  40. VOICE: 708.467.1984            Evanston, Illinois   60208-2323
  41.