+ Reply to Thread
Results 1 to 6 of 6

Excel 2007 : Weird result from concatenation

  1. #1
    Registered User
    Join Date
    06-20-2012
    Location
    Montreal
    MS-Off Ver
    Excel 2003
    Posts
    6

    Wink Weird result from concatenation

    I usually have no problems using concatenation but I am having a formatting problem for which I have not been able to find a solution so far. Perhaps some of you have seen this before and have a suggestion for me. So here goes:

    I have a text value in cell A1: "Incomplete process"
    I have a numerical value in cell B1: 52.9 (this is derived from another sheet in the workbook)
    I am using this simple formula: =CONCATENATE(a1," ","at"," ",B1," ","per cent")
    I am getting the following result (actually it's what I want): Incomplete process at 52.8571428571429 per cent
    I like precision just as much as anyone else, but this is a bit overboard... How can I simply get 52.9 instead of that elongated number? This is in Excel 2007.

    Any suggestions?

    Thanks!
    Last edited by magnanr; 07-18-2012 at 12:13 PM. Reason: Solved

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,452

    Re: Weird result from concatenation

    Replace A1 with ROUND(A1,2) perhaps

  3. #3
    Valued Forum Contributor
    Join Date
    05-07-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    354

    Re: Weird result from concatenation

    MAY BE

    =CONCATENATE(a1," at ",ROUND(B1,2) ," per cent")
    Regards,
    Vandan

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Weird result from concatenation

    You can use the TEXT() function for the B1 part.

    Like TEXT(B1,"0.0")

  5. #5
    Registered User
    Join Date
    06-20-2012
    Location
    Montreal
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Weird result from concatenation

    I tried it before posting, tried it again as you suggested, I guess I was making a mistake in my brackets, because it wasn't working, and now it does! Problem solved ,thank you so much.

  6. #6
    Valued Forum Contributor
    Join Date
    05-08-2012
    Location
    Georgia, USA
    MS-Off Ver
    Excel 2003, 2010
    Posts
    811

    Re: Weird result from concatenation

    Try the FIXED Function ie

    =CONCATENATE(a1," ","at"," ",FIXED(B1,1)," ","per cent")

    or
    =A1&" ","&at&"," "&fixed(B1,1)&" per cent")
    One side benefit of the fixed function is that it adds commas to the result if the value is above 999 ie 1,000

    Kirk
    Click on star (*) below if this helps

+ 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