+ Reply to Thread
Results 1 to 11 of 11

Combine Text with numbers driven from a formula, and include a comma

  1. #1
    Forum Contributor
    Join Date
    07-04-2013
    Location
    United States
    MS-Off Ver
    Excel for Mac -V 16.33 -- Office 365
    Posts
    279

    Combine Text with numbers driven from a formula, and include a comma

    I am trying to figure out how to combine text with numbers that were generated from a formula. I am successful in making it happen, except I can't get the number to include a comma separator. Any suggestions?

    ="Total Sets Forecast"&":"&" "&SUM(E5:P5)
    Result is: Total Sets Forecast: 22268
    I am wanting the result to be: Total Sets Forecast: 22,268

    I have another one with a bit more complicated formulas as shown below. Same issue applies.
    ="Current Inventory"&":"&" "&SUMPRODUCT(($D$9:$D$170)*(LEFT(A9:A$170,LEN(E$2))=E$2))
    Result is: Current Inventory: 22000
    I am wanting the result to be: Current Inventory: 22,000

    Thanks in advance.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Combine Text with numbers driven from a formula, and include a comma

    Try this...
    ="Total Sets Forecast: "&TEXT(SUM(E5:P5),"##,###")

    The other 1 should work the same way.

    Note, you dont need to split up ...
    "Current Inventory"&":"&" "&......
    you can use...
    "Current Inventory: "&.......
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Combine Text with numbers driven from a formula, and include a comma

    example:
    ="Total: "&TEXT(SUM(N17:N19),"#,##0.00")

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Combine Text with numbers driven from a formula, and include a comma

    How about

    ="Total Sets Forecast:"&" "&TEXT(SUM(E5:P5),"#,000")
    Dave

  5. #5
    Forum Contributor
    Join Date
    07-04-2013
    Location
    United States
    MS-Off Ver
    Excel for Mac -V 16.33 -- Office 365
    Posts
    279

    Re: Combine Text with numbers driven from a formula, and include a comma

    Thank you. The suggestion worked great for the first one but not the second. I tried to add the number signs in the sequence you suggested as shown below:


    ="Current Inventory"&":"&" "&SUMPRODUCT(($D$9:$D$170)*(LEFT(A9:A$170,LEN(E$2))=E$2)),"##,###")

    Unfortunately I got an error message that said:

    The formula you typed contains an error.
    • To get assistance in entering a function, click OK,then click Function on the Insert menu.
    • If you are not trying to enter a formula, avoid using an equal sign (=) or minus sign (-), or precede it with a single quotation mark (').

    Thanks in advance.

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Combine Text with numbers driven from a formula, and include a comma

    ="Current Inventory"&":"&" "&TEXT(SUMPRODUCT(($D$9:$D$170)*(LEFT(A9:A$170,LEN(E$2))=E$2)),"#,##0.00")

  7. #7
    Forum Contributor
    Join Date
    07-04-2013
    Location
    United States
    MS-Off Ver
    Excel for Mac -V 16.33 -- Office 365
    Posts
    279

    Re: Combine Text with numbers driven from a formula, and include a comma

    This worked Great for both. Thanks!

  8. #8
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Combine Text with numbers driven from a formula, and include a comma

    You are welcome, don't forget mark thread as solved

    To mark your thread solved do the following:
    -Go to the top of the first post
    -Select Thread Tools
    -Select Mark thread as Solved
    Last edited by sandy666; 10-22-2015 at 01:22 AM.

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Combine Text with numbers driven from a formula, and include a comma

    Perk happy to help, thanks for the feedback

    Sandy, you dont need to break the text up like that (see my comment in post #2

  10. #10
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Combine Text with numbers driven from a formula, and include a comma

    Ford, I just copied his formula, add TEXT and that's all. Do you see breaking text in my previous post?

  11. #11
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Combine Text with numbers driven from a formula, and include a comma

    Quote Originally Posted by sandy666 View Post
    Ford, I just copied his formula, add TEXT and that's all. Do you see breaking text in my previous post?
    Nope, thats why I mentioned it

+ 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. [SOLVED] Counting a range of cells that include text and numbers
    By jbourne21 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-30-2015, 05:58 AM
  2. Dynamic graph driven by input-driven named ranges
    By gwebb in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 06-24-2015, 09:22 AM
  3. VBA driven e-mail fails to include Body text
    By Frankie_The_Flyer in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-27-2015, 05:06 AM
  4. Replies: 8
    Last Post: 12-08-2014, 09:27 PM
  5. problem autofiltering text (numbers) including comma
    By petca059 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-12-2014, 10:04 AM
  6. numbers with `comma style` in text format
    By Vogelmann in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-22-2012, 11:37 AM
  7. adding cells which include numbers and text
    By Shelley in forum Excel General
    Replies: 6
    Last Post: 10-25-2005, 11:05 PM

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