Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / March 2007

Tip: Looking for answers? Try searching our database.

DisplayedText?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
James Allen - 19 Mar 2007 16:54 GMT
Hi,

Is there no function (Excel 2002) to return the Text() of another cell, as
it is displayed?
For example, if I had a formula =DisplayedText(Data!A1), I would want it to
return:
"" if Data!A1 is blank
"" if Data!A1=0 and Zeros are not displayed on Data
"0" if Data!A1=0 and Zeros are displayed on Data
"z1" if Data!A1=1 and its format = zGeneral
etc.

I thought =Text(Data!A1,Cell("format",Data!A1)) would do it, but tried and
discovered otherwise.  I'm sure a user defined function could be programmed
for this but it sure seems like it would already be built in.

Thank you,
Signature

James Allen
Malicoat-Winslow Engineers, P.C.
Columbia, MO

Bernie Deitrick - 19 Mar 2007 19:09 GMT
James,

It isn't built-in.  But the User-Definded-Function, below, will do what you want.

Function DisplayedText(myCell As Range) As String
DisplayedText = myCell.Text
End Function

Use it as in your example:

=DisplayedText(Data!A1)

HTH,
Bernie
MS Excel MVP

> Hi,
>
[quoted text clipped - 11 lines]
>
> Thank you,
James Allen - 20 Mar 2007 14:55 GMT
That will work.  Thank you Bernie.
Signature

James Allen
Malicoat-Winslow Engineers, P.C.
Columbia, MO

> James,
>
[quoted text clipped - 12 lines]
> Bernie
> MS Excel MVP
<snip>
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.