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?
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?
="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?
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?
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?
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
Wow, very cool! Thanks Biff! It wasn't even my question and I learned something... go figure
PZan
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks