+ Reply to Thread
Results 1 to 7 of 7

Combining data columns - Excel changes number

  1. #1
    Registered User
    Join Date
    02-07-2008
    Posts
    3

    Combining data columns - Excel changes number

    Hello,

    I am having some problems when I combine two columns of data.

    My first column of data is prices : $39.95
    My second column is % off : 50%

    What I am trying to do is combine the two columns of data so they would read :
    $39.95 You save 50%

    I am using a formula as follows =C2&"You Save"&D2

    When I use this formula the output is 39.5You Save0.5

    Now the no spaces between You Save is one thing, I could probably use a find & replace on that and put in some spaces. What is driving me up a damn wall, however, is the removal of $ and changing my % to a decimal. I've tried changing the new column to every column format in the options and nothing changes. Except if I set the column to "text" then the formula stops working.

    What's the deal??

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    Excel is converting the numbers into its default format.

    Using the TEXT function allows you to specify the format for number conversion.
    This formula should do what you want.
    =TEXT(C2"$#,##0.00")&" You Save "&TEXT(D2,"00%")

    Note the added spaces in " You Save "
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Forum Contributor
    Join Date
    08-10-2006
    Posts
    723
    or try this

    =TEXT(C2&" you save" &" " &D2,"text")

    format the column d to text

    steve

  4. #4
    Registered User
    Join Date
    02-07-2008
    Posts
    3
    Quote Originally Posted by stevekirk
    or try this

    =TEXT(C2&" you save" &" " &D2,"text")

    format the column d to text

    steve

    When I format column D to text, it immediately changes my % values to decimal and removes the % sign. Ie.. 50% now = .5 -- This being said even if I complete the formula the $ sign is still removed from my prices ;( so it shows 39.95 you save .5 which brings me back to square 1

    Using the TEXT function allows you to specify the format for number conversion.
    This formula should do what you want.
    =TEXT(C2"$#,##0.00")&" You Save "&TEXT(D2,"00%")
    This as soon as I put it in just says it has an error but doesn't give me any specifics as to what it is.


    Either way thanks for trying ;=)

  5. #5
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    I missed a comma

    =TEXT(C2 , "$#,##0.00")&" You Save "&TEXT(D2,"00%")

  6. #6
    Forum Contributor
    Join Date
    08-10-2006
    Posts
    723
    hi, cannot undersatnd why

    see attached
    steve
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    02-07-2008
    Posts
    3
    Quote Originally Posted by mikerickson
    I missed a comma

    =TEXT(C2 , "$#,##0.00")&" You Save "&TEXT(D2,"00%")

    That got it.

    Thank you both, just made my night

+ 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