home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / apps / spreadsh / 648 < prev    next >
Encoding:
Internet Message Format  |  1992-11-10  |  1.4 KB

  1. Path: sparky!uunet!ogicse!emory!sol.ctr.columbia.edu!usc!randvax!cis.rand.org!cave
  2. From: cave@cis.rand.org (Jonathan Cave)
  3. Newsgroups: comp.apps.spreadsheets
  4. Subject: Re: Excel macro help! !pleh orcam lecxE
  5. Keywords: macro flip excel help writing stupid
  6. Message-ID: <13975@cis.rand.org>
  7. Date: 10 Nov 92 16:36:25 GMT
  8. Article-I.D.: cis.13975
  9. References: <udarryl.721045294@mcl>
  10. Sender: news@cis.rand.org
  11. Reply-To: cave@cis.rand.org (Jonathan Cave)
  12. Organization: RAND, Santa Monica CA
  13. Lines: 33
  14.  
  15. In article <udarryl.721045294@mcl> udarryl@mcl.ucsb.edu (Darryl 'Well) writes:
  16. |
  17. |ANYWAYS, right nowm, my macro looks like this:
  18. |
  19. |A1     flipit
  20. |A2     =ARGUMENT("tex",2)
  21. |A3     =FOR("count",1,LEN(tex),1)
  22. |A4     =count
  23. |A5     =(LEN(tex)+1)-count
  24. |A6     =REPLACE(tex,count,1,MID(tex,(LEN(tex)+1)-count,1))
  25. |A7     =NEXT()
  26. |A8     =tex
  27. |A9     =RETURN(A6)
  28. ||
  29. |(cells a4, and a8, are strictly for debugging purposes, unless you can
  30. |think of a better use for them)
  31.  
  32. There is certainly a better use for A8 -- it is a good place to keep
  33. track of the current version of tex.  The problem with the macro as written
  34. is that the variable "tex" does not get updated.
  35.  
  36. Try the following
  37.  
  38. |A1     flipit
  39. |A2     =ARGUMENT("tex",2)
  40. |A3     =FOR("count",1,LEN(tex),1)
  41. |A4     =if(count=1,tex,A6)
  42. |A5     =(LEN(A4)+1)-count
  43. |A6     =REPLACE(A4,count,1,MID(A4,(LEN(A4)+1)-count,1))
  44. |A7     =NEXT()
  45. |A8     =RETURN(A6)
  46.  
  47.                     Jonathan
  48.