home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / apps / spreadsh / 464 < prev    next >
Encoding:
Internet Message Format  |  1992-08-26  |  2.2 KB

  1. Path: sparky!uunet!gatech!concert!duke!news.duke.edu!acpub.duke.edu!maria
  2. From: maria@acpub.duke.edu (Maria Spicer)
  3. Newsgroups: comp.apps.spreadsheets
  4. Subject: Re: help: 123 data table, @dsum()
  5. Summary: Using /data table on "continuous"-type data
  6. Message-ID: <4891@news.duke.edu>
  7. Date: 26 Aug 92 21:28:20 GMT
  8. References: <1992Aug26.170745.29793@cbnewsj.cb.att.com>
  9. Sender: news@news.duke.edu
  10. Organization: Duke University; Durham, N.C.
  11. Lines: 43
  12. Nntp-Posting-Host: lori.soc.duke.edu
  13.  
  14. Hi Dave!
  15.  
  16. I have run up against this problem in the past when trying to make data
  17. tables of SEX vs. AGE, where I wanted AGE to be say, <18, 18-25, 26-30, 
  18. etc., much as you want your dates to be 15Jun92-14Jul92, 15Jul92-14Aug92,
  19. etc., as I understand it.  The only solution I was ever able to come up
  20. with was to create another column next to the AGE column, called "AGEGRP",
  21. where I used a lookup table to assign values based on which range the age
  22. fell into.  For example:
  23.  
  24.   |  A   |   B   |   C   |   D   |   E   |
  25. --|------|-------|-------|-------|-------|
  26. 1 | AGE  | AGEGrp|       | lookup table  |
  27. 2 |  15  |   1   |       |  17   |   1   |
  28. 3 |  22  |   2   |       |  25   |   2   |
  29. 4 |  21  |   2   |       |  30   |   3   |
  30. 5 |  43  |   6   |       |  35   |   4   |
  31. 6 |  17  |   1   |       |  40   |   5   |
  32. 7 |  39  |   4   |       |  45   |   6   |
  33.  
  34. Where the formulas in column B would be fashioned after 
  35. B2: @vlookup(A2,$table,1), and the range named "table" is 
  36. D2..E7.  Having done this, you can run /Data Table on the
  37. values in column B rather than column A, knowing that 
  38. AgeGrp=1 means Age<18, AgeGrp=2 means Age is 18-25, etc.
  39.  
  40. This same idea could be applied to your date dilemma.
  41. Use a formula to create a column of date values equal
  42. to the 15th of every month for the given year.  Then use
  43. the same sort of scheme to look up a DateGrp variable
  44. and run your table on it.
  45.  
  46. There may be a more succinct solution out there, but I haven't
  47. found it.  Send me E-Mail if you want more help with this one.
  48.  
  49. Have fun!
  50. Maria
  51.  
  52. -- 
  53. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  54. ^   Maria Spicer, DP Specialist        maria@soc.duke.edu           ^
  55. ^   140 Soc-Psych Bldg            919-660-5602                 ^
  56. ^   Duke University, Durham, NC        919-660-4317                 ^
  57.