+ Reply to Thread
Results 1 to 7 of 7

Cell Formatting Problem

  1. #1
    Registered User
    Join Date
    10-30-2009
    Location
    UK
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    60

    Cell Formatting Problem

    Thanks, now Solved




    I have a simple table like so:


    Please Login or Register  to view this content.
    where A is average, B is actual and C is variance.

    In D1 I'd like to show the contents of B1 along with C1 in brackets so I've used =A1&" ("&B1&")" but this formats the result as 0.5 (-0.1).

    Is there any way to format D1 to show the values as percentage and include "+" if above average and "-" if below?
    Last edited by Janc; 12-12-2011 at 08:09 PM. Reason: Solved

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,065

    Re: Cell Formatting Problem

    Try

    =TEXT(A1,"00%")&" ("&TEXT(B1,"00%")&") "&TEXT(C1,"00%")
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Registered User
    Join Date
    10-30-2009
    Location
    UK
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    60

    Re: Cell Formatting Problem

    Thanks this works perfectly to show the numbers in the correct percentage format

    Is there any way to include a "+" sign if the number is positive?

  4. #4
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Cell Formatting Problem

    in d1 i'd like to show the contents of b1 along with c1 in brackets
    =text(b1,"#%")&" ("&text(c1,"#%")&")"&if(b1>a1,"+","")
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  5. #5
    Registered User
    Join Date
    10-30-2009
    Location
    UK
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    60

    Re: Cell Formatting Problem

    Thanks that doesn't quite work as is as it adds the "+" to the end - however I've juggled it a little and got it how I want it.

    Thanks very much to both of you


    Edit: For future reference, this is how I've entered it: =TEXT(L1, "+#%;-#0#%;#0%#")&" ("&TEXT(K1, "#%")&")"
    Last edited by Janc; 12-12-2011 at 08:29 PM. Reason: Edited my edit as I'd made a mistake with it

  6. #6
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Cell Formatting Problem

    Another one...

    =TEXT(B1,"#%") &"("& TEXT(B1-A1,"#%")&")"

    Your c is computing b1-a1 thats why you receive - 10 right, how about to include the formula there..
    Last edited by vlady; 12-12-2011 at 08:25 PM. Reason: beaten uppppp.
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  7. #7
    Registered User
    Join Date
    10-30-2009
    Location
    UK
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    60

    Re: Cell Formatting Problem

    Thanks vlady - I may add the formula into the function, it will make the sheet tidier as there are 100's of entries

+ 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