+ Reply to Thread
Results 1 to 9 of 9

displaying fractions in a concatenate formula

  1. #1
    Registered User
    Join Date
    11-03-2003
    Location
    NSW Riverina, Australia
    MS-Off Ver
    365
    Posts
    29

    displaying fractions in a concatenate formula

    If I have a formula that concatenates text and numbers, for example, =concatenate("The average of ",A1," and ",A2," is = ",(A1+A2)/2) and I want the formula to display the "(A1+A2)/2" part as a fraction. The values in A1 and A2 will be integers.

    Can this be done in a non-VBA way?

    I'm using Excel 2003.

    Thanks in advance,

    Dave.
    Regards,

    David Obeid

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486
    Quote Originally Posted by DavidObeid
    If I have a formula that concatenates text and numbers, for example, =concatenate("The average of ",A1," and ",A2," is = ",(A1+A2)/2) and I want the formula to display the "(A1+A2)/2" part as a fraction. The values in A1 and A2 will be integers.

    Can this be done in a non-VBA way?

    I'm using Excel 2003.

    Thanks in advance,

    Dave.
    ="The Average of"&A1&" "&A2&" "&"is= "&(a1+a2)/2
    should work
    notice the spaces

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486
    ="The Average of "&A1&" and "&A2&" "&"is= "&(A1+A2)/2
    this could work better

  4. #4
    Registered User
    Join Date
    11-03-2003
    Location
    NSW Riverina, Australia
    MS-Off Ver
    365
    Posts
    29
    Thanks,

    I tried it, but it didn't work.

    Here is (exactly) what I got after entering 3 in A1 and 4 in A2:

    "The Average of3 4 is= 3.5"

  5. #5
    Registered User
    Join Date
    11-03-2003
    Location
    NSW Riverina, Australia
    MS-Off Ver
    365
    Posts
    29
    Thanks again, but now I get this:

    The Average of 3 and 4 is= 3.5

    I'm still not getting the 3.5 to read as 3 1/2

  6. #6
    Dave Peterson
    Guest

    Re: displaying fractions in a concatenate formula

    Use
    ="The Average of "&A1&" and "&A2&" "&"is = "& TEXT((A1+A2)/2,"# ??/??")

    You may want to use more ??? depending on what you want for the denominator.

    DavidObeid wrote:
    >
    > Thanks again, but now I get this:
    >
    > The Average of 3 and 4 is= 3.5
    >
    > I'm still not getting the 3.5 to read as 3 1/2
    >
    > --
    > DavidObeid
    >
    > ------------------------------------------------------------------------
    > DavidObeid's Profile: http://www.excelforum.com/member.php...fo&userid=2238
    > View this thread: http://www.excelforum.com/showthread...hreadid=564534


    --

    Dave Peterson

  7. #7
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486
    ="The Average of "&A1&" and "&A2&" "&"is= "&TEXT(((A1+A2)/2),"#?/?")
    Okay I am getting closer I am now at 7/2
    still working on the format

  8. #8
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486
    Quote Originally Posted by davesexcel
    ="The Average of "&A1&" and "&A2&" "&"is= "&TEXT(((A1+A2)/2),"#?/?")
    Okay I am getting closer I am now at 7/2
    still working on the format
    Oh,
    I see dave got it

  9. #9
    Registered User
    Join Date
    11-03-2003
    Location
    NSW Riverina, Australia
    MS-Off Ver
    365
    Posts
    29
    Thanks! I got 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