+ Reply to Thread
Results 1 to 5 of 5

Conditional text addition to a formula

  1. #1
    Registered User
    Join Date
    10-28-2014
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5

    Conditional text addition to a formula

    Hi all,

    I am trying to create a cell that will express the difference between two numbers as a percentage.

    The problem is trying to add a "+" sign to the number if it is positive.

    I have tried to use if(A1>0,"+"&A1,A1) but then I get something like +0.564586218431

    I then tried something like if(A1>0,"+"&round(A1,3),A1) and I get +0.565 (even though the format is in percentage)

    I tried a lot of other things including custom formats but have run out of ideas.

    Does anyone want to give this a shot?

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,647

    Re: Conditional text addition to a formula

    May be this.....

    Please Login or Register  to view this content.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Conditional text addition to a formula

    welcome to the forum, MiningCam. when you used the double quotes, you have already converted the cell to a text. formatting the cells would not help when done so

    try either
    =IF(A1>0,TEXT(A1,"+0.000%"),A1)

    or:
    =A1
    format cells -> Custom:
    "+"0.000%;-General

    the 1st part is for positive. 2nd part for negative. this is good because your cell is still a number

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Registered User
    Join Date
    10-28-2014
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Conditional text addition to a formula

    Thank you both for the quick replies and quality answers!
    I was close, I tried =if(A1>0,"+"&text(A1,0.00%),A1).
    Just forgot the " syntax around the 0.00%.

  5. #5
    Registered User
    Join Date
    10-28-2014
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Conditional text addition to a formula

    @Benishiryo I am fine with the cell being in text for this purpose but it is good to know that it is possible to keep it as a number. Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Conditional Formatting??? Or addition to existing formula
    By Angel72 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-25-2014, 04:08 PM
  2. Conditional row addition
    By tikrit in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-02-2012, 08:33 AM
  3. Conditional Addition
    By cellfservices in forum Excel General
    Replies: 3
    Last Post: 01-16-2010, 01:17 AM
  4. Conditional addition
    By matralab in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-06-2009, 09:47 AM
  5. Excel 2007 : Conditional Addition
    By hayhursm in forum Excel General
    Replies: 5
    Last Post: 10-15-2008, 09:40 AM

Tags for this Thread

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