+ Reply to Thread
Results 1 to 9 of 9

Putting text at the end of formula results

Hybrid View

  1. #1
    Registered User
    Join Date
    11-26-2009
    Location
    San Diego
    MS-Off Ver
    Excel 2007
    Posts
    12

    Putting text at the end of formula results

    I'm trying to enter relatively simple drug calculation formulas in Excel where the result is appended with the proper units to administer. For example, if I'm calculating for units of regular insulin with a formula such as:

    =0.75*f2

    I'd like the cell to make the above calculation, and append it with "Units Reg Insulin" or something similar. Thus far, I've just been putting the units as text in adjacent cells but the result looks a bit messy.

    Is this possible? I'm using Excel 2007 and the Help index does not seem to offer much guidance about this.

    Thank you for any help!
    Last edited by stephens; 01-08-2010 at 04:07 PM.

  2. #2
    Valued Forum Contributor khamilton's Avatar
    Join Date
    10-08-2009
    Location
    IL
    MS-Off Ver
    Excel 2007
    Posts
    345

    Re: Putting text at the end of formula results

    to join text at the end of your formula put this
    &"Units Reg Insulin"
    Please acknowledge the response you receive, good or bad. If your problem is solved, please say so clearly, and mark your thread as Solved: Click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Edit button will not appear -- ask a moderator to mark it.

  3. #3
    Registered User
    Join Date
    11-26-2009
    Location
    San Diego
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Putting text at the end of formula results

    khamilton wrote: "to join text at the end of your formula put this
    &"Units Reg Insulin""


    Thanks. I tried that, but what happens is the formula, which I specify to calculate to 0 decimal points, calculates to 16 decimal points instead, sweeping the text out of the cell. Is this some sort of glitch? When attempting to reformat the decimal places, 0 still appears in the formatting despite the spreadsheet calculating to 16 decimal places. Hmmm.

  4. #4
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191

    Re: Putting text at the end of formula results

    Alternately, custom format as General" Units Reg Insulin" and then use the formula you already have.
    Last edited by darkyam; 01-08-2010 at 02:42 PM.

  5. #5
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191

    Re: Putting text at the end of formula results

    Are you using a Round function in your formula? If you want 0 decimal places, you can change my suggestion to 0" Units Reg Insulin", and that will also round automatically.

  6. #6
    Registered User
    Join Date
    11-26-2009
    Location
    San Diego
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Putting text at the end of formula results

    darkyam, that DOES work. In case anybody else comes to this thread and is interested in the function darkyam suggests, go to Format Cells, Custom, Type:, and type

    0 "Whatever Text You Want to Appear"

    It would be nice to be able to apply the text the way khamilton suggests, though. Any thoughts as to why I experience the apparent glitch?

  7. #7
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191

    Re: Putting text at the end of formula results

    I don't see any rounding function in your original formula. If you changed it to =Round(.75*F2,0)&" Units Reg Insulin", it should come out with the same result.

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Putting text at the end of formula results

    What darkyam suggests is preferable, IMO; the result is a number and can be used in further calculations. The units are just formatting.

    With khamilton's suggestion (which is appropriate for some circumstances), the result is text. The number will appear in full precision unless you format (or round) it:

    =text(A1, "0") & " your text"
    Entia non sunt multiplicanda sine necessitate

  9. #9
    Registered User
    Join Date
    11-26-2009
    Location
    San Diego
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Putting text at the end of formula results

    OK. Thank you all for helping me understand this!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1