Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!helios!aim1!jlr1801 From: jlr1801@aim1.tamu.edu (Jeff Rife) Newsgroups: comp.windows.ms Subject: Re: Advanced Question on MS Excel Keywords: excel Message-ID: <13293@helios.TAMU.EDU> Date: 12 Mar 91 05:19:28 GMT References: <1991Mar11.181022.3790@unidui.uni-duisburg.de> Sender: usenet@helios.TAMU.EDU Organization: City of College Station, Texas Lines: 31 In article <1991Mar11.181022.3790@unidui.uni-duisburg.de> hn277pk@unidui.uni-duisburg.de (Koch) writes: > >I would like to put the string "0123" or even better " 0123 " into >a field. Now using =FORMULA("0123") does not work since >Excel interprets this as =FORMULA(123). Since I must have a string >in the field =FORMULA("=""0123""") is not what I want, even if the result >looks right. I know it is possible to have such a string in a field >but so far I could figure out only the following way: Use a dialog >box with a text field and enter 0123 -- obviously this cannot be used >within macros. > Two possibilities, both assuming you just want it in a cell. I'm not sure exactly what you do want, but here goes: 1) In the formula bar, type: ="0123" You can simulate this in a macro with SEND.KEYS("=""0123"""), if the quotes work out. 2) Format the cell using 0000 as the format string. You'll have to type this in yourself. It will force the number to be displayed with the leading zero. If neither one of these is anything close to what you want to do, please ignore this post. -- Jeff Rife P.O. Box 3836 | "Because he was human; because he had goodness; College Station, TX 77844 | because he was moral they called him insane. (409) 823-2710 | Delusions of grandeur; visons of splendor; jlr1801@aim1.tamu.edu | A manic-depressive, he walks in the rain."