+ Reply to Thread
Results 1 to 10 of 10

Display a string of text with multiple cell values

  1. #1
    Forum Contributor
    Join Date
    07-22-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    122

    Display a string of text with multiple cell values

    I am trying to create a formula to display a string of text that refers to multiple cells. for example, =If(A1=0,"insert text here" &B1 "insert more text here" &B2 "insert even more text here" &B3, "insert text here" &C1 "Insert text here"). Is this possible? It works fine for one cell value, like ="Total: " &A1
    Last edited by paxile2k; 07-30-2009 at 04:21 PM.

  2. #2
    Forum Contributor
    Join Date
    07-24-2009
    Location
    Valrico, FL USA
    MS-Off Ver
    Excel 2016
    Posts
    358

    Re: Display a string of text with multiple cell values

    Put the ampersand on the other side of the cell reference too.

    Example:

    ="insert text here" &B1& "insert more text here"


    Norman

  3. #3
    Forum Contributor
    Join Date
    07-22-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    122

    Re: Display a string of text with multiple cell values

    Thankyou for your response,
    That worked beautifully, is there way to round the value of a cell in that display to 2 decimal points also so it will clean up the display of the output?

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Display a string of text with multiple cell values

    Yes,
    Please Login or Register  to view this content.
    Does that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Forum Contributor
    Join Date
    07-22-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    122

    Re: Display a string of text with multiple cell values

    Thankyou again for your response,
    would the =Text(cell, "#.##") be used in the first formula for displaying text and cell values? or applied to the cell in question?
    ="insert text here" =TEXT(B1,"#.##)&B1& "insert more text here" ?
    Last edited by paxile2k; 07-30-2009 at 02:32 PM.

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Display a string of text with multiple cell values

    It would be used in the formula ncmay gave you.

  7. #7
    Forum Contributor
    Join Date
    07-22-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    122

    Re: Display a string of text with multiple cell values

    thankyou again for your response,
    I must be having some difficulty, when i use ncmay's formula, it does display all the info needed, but one of the values it is pulling is displaying with more then 2 decimal places, i am just trying to clean it up to only display 2 dec point within that formula, when i do use ncmays it looks like this:

    insert text here 134.8105666666667 insert more text here

    the cell it refers to does display itself at 134.81 due to formatting

    If i have another cell the uses the =TEXT(B1,"#.##) in C1 for that cell, then use C1 in nmcays formual it works. But i am trying to cut back on adding more cells to display the information then to use in another formula in another cell.
    Last edited by paxile2k; 07-30-2009 at 04:15 PM.

  8. #8
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Display a string of text with multiple cell values

    Yes, what Excel displays is not always the same as what is in Excel's memory (Important to remember when doing calculations). So, ncmay's formula would be revised to
    Please Login or Register  to view this content.
    Don't forget the quotes around #.##. They are necessary.

  9. #9
    Forum Contributor
    Join Date
    07-22-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    122

    Re: Display a string of text with multiple cell values

    Thankyou again for your response and time,
    That worked perfectly, thankyou so much for your assistance, it was greatly appreciated. so the & makes all the difference when using the the text formula and cell reference in this

  10. #10
    Registered User
    Join Date
    04-12-2012
    Location
    mumbai
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Display a string of text with multiple cell values

    i want to display multiple cell values in a single userform containing a message box...is that possible, m new to vb in excel, but have a craze to learn about it

+ 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