+ Reply to Thread
Results 1 to 6 of 6

Inserting a text character after formula

Hybrid View

  1. #1
    Registered User
    Join Date
    02-01-2005
    Posts
    5

    Question Inserting a text character after formula

    Please excuse this humble question from a total newbie ... how do I insert a single text character after a formula?

    The formula works out a total, dependant on user input, but I need to put a text character immediately after the total, eg: 29A, 41C, etc.

    Many thanks.

  2. #2
    pinmaster
    Guest
    Hi
    Use the & sign:
    =your_formula&"A"

    HTH
    JG

  3. #3
    Registered User
    Join Date
    02-01-2005
    Posts
    5

    Thank you ... but ...

    Hello

    Thank you ever so much for your help. I've tried what you suggested, but although it does work, it also throws the calculation result out. The results are percentages, and the cells have been formatted so that the results are shown as whole numbers only. When I try to add a text figure immediately after the formula, the percentages revert to 'something-point-loads of numbers'.

    Being a newbie (and a grey-haired one at that!), I've been trying to teach myself to use Excel, so I'm probably doing loads of things wrong, even though I'm managing to achieve the required results ... until now.

    This one has got me stumped.

    Wendy

  4. #4
    Forum Expert swatsp0p's Avatar
    Join Date
    10-07-2004
    Location
    Kentucky, USA
    MS-Off Ver
    Excel 2010
    Posts
    1,545
    Wendus: whenever you add text to number, Excel treats the entire result as text. Hence, you will lose any number style formatting ($, %, Dates, etc.) You can, however, limit the number of characters displayed in your number result by using the Round function and force a display as % as such:

    =ROUND(A1/A2,2)*100&"% A" so that if A1=27 and A2=47 the displayed result will be:

    57% A

    note: the ",2" in the formula says to only display 2 places past the decimal, this can be adjusted to meet your needs. e.g. ",3" would show 57.4% A as the result.

    Hope This Helps (HTH)
    Bruce
    The older I get, the better I used to be.
    USA

  5. #5
    Registered User
    Join Date
    02-01-2005
    Posts
    5

    Thumbs up Thank You Bruce!

    Bruce, I love you! Thank you so so much, everything works perfectly now!

    Purely as a matter of interest (and no, this isn't what I want to do, it's just my mind racing on ...), if all the percentage results were in a row, and needed to be totalled in the final cell, could it be done, or would the text characters make the whole row 'unreadable' to a formula in the final cell?

    Thank you again, your help is very much appreciated.

    Wendy

  6. #6
    Forum Expert swatsp0p's Avatar
    Join Date
    10-07-2004
    Location
    Kentucky, USA
    MS-Off Ver
    Excel 2010
    Posts
    1,545
    Wendy: You are welcome (and I love helping you)

    As for totalling (summing) the column of results, what you ask IS possible, but requires using an ARRAY formula (which is entered by pressing CTRL+SHIFT+ENTER)

    Assuming your newly calculated %'s are in column C (rows 1-4 in my example), in cell C5 enter this formula and use the key combination above to confirm (enter) it:

    =SUM(VALUE(LEFT(C1:C4,2)))&"% A"

    after you press CTRL+SHIFT+ENTER, the formula will look like this in the formula bar:

    {=SUM(VALUE(LEFT(C1:C4,2)))&"% A"} note the braces that Excel places around the formula!

    The result will be the sum of the numbers plus the addition of the % sign and the letter 'A' after the number. Also note the ,2 in the formula will look at the first 2 digits, if you have carried your number to decimals, adjust this to ,4 or more as needed (remember to count the decimal as one place, so 54.7% is four characters for the number!)

    The main problem, of course, is if you need to use letters other than 'A', as each would need to manually be edited in each formula, and the sum formula would only return whatever letter you entered in the &"% _" portion.

    Good Luck

+ 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