+ Reply to Thread
Results 1 to 6 of 6

Equation in text string?

  1. #1
    hoising8
    Guest

    Equation in text string?

    Is it possible to have an equation within a text string. For example, could
    I have a text string that says, "The average number of hours worked this week
    was __". And have the blank be an average of cells I assign it?

  2. #2
    Tom Ogilvy
    Guest

    Re: Equation in text string?

    ="The average number of hours worked this week was " &
    TEXT(AVERAGE(A1:A7),"hh")

    --
    Regards,
    Tom Ogilvy



    "hoising8" <hoising8@discussions.microsoft.com> wrote in message
    news:60BAAFA8-11E5-4ECA-97EB-847DEE7506B1@microsoft.com...
    > Is it possible to have an equation within a text string. For example,

    could
    > I have a text string that says, "The average number of hours worked this

    week
    > was __". And have the blank be an average of cells I assign it?




  3. #3
    Biff
    Guest

    Re: Equation in text string?

    Hi!

    Try this:

    ="The average number of hours worked this week was
    "&AVERAGE(range_to_average)

    Biff

    "hoising8" <hoising8@discussions.microsoft.com> wrote in message
    news:60BAAFA8-11E5-4ECA-97EB-847DEE7506B1@microsoft.com...
    > Is it possible to have an equation within a text string. For example,
    > could
    > I have a text string that says, "The average number of hours worked this
    > week
    > was __". And have the blank be an average of cells I assign it?




  4. #4
    FSt1
    Guest

    RE: Equation in text string?

    hi,
    yes you can. depending. you didn't say where the text string would be....so
    i'm guessing and assuming your average of cell is in A1 and that we are going
    to shorten the text.
    on the sheet in cell iv2.... ="the average is " & A1

    In a message box....
    Sub test1()
    msgbox("the average is " & A1)
    end sub

    regards
    hope this helps
    FSt1

    "hoising8" wrote:

    > Is it possible to have an equation within a text string. For example, could
    > I have a text string that says, "The average number of hours worked this week
    > was __". And have the blank be an average of cells I assign it?


  5. #5
    Registered User
    Join Date
    05-18-2005
    Posts
    60
    Is there a compelling reason why it can't be in the cell just adjacent to the sentence you wrote below? I doub't anyone would know, especially if they were looking at it in printed format, but if you "un-show" grid lines (from the tools/options menu) they wouldn't be able to tell when first looking at it in excel.

    PZan

  6. #6
    Registered User
    Join Date
    05-18-2005
    Posts
    60
    Wow, very cool! Thanks Biff! It wasn't even my question and I learned something... go figure

    PZan

+ 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