Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Reference value as shown

Posted on 2013-02-04
2
Medium Priority
?
160 Views
Last Modified: 2013-02-21
Is there a way to reference what is visibly shown in a cell and not the number in the cell?
0
Comment
Question by:BigWill5112
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 50

Expert Comment

by:barry houdini
ID: 38852462
Can you give an example? Most formulas reference the underlying value in a cell - e.g. for a date the underlying value is a serial number - you only see the date if you format the result cell accordingly.

regards, barry
0
 
LVL 93

Accepted Solution

by:
Patrick Matthews earned 2000 total points
ID: 38852917
Not sure why you would want to do this.

If you happened to know the number format being applied, you could use the TEXT function.  For example:

=TEXT(A2,"$#,##0.00;($#,##0.00)")

If you do not know ahead of time, you would need to use VBA:

Function CellText(cel As Range)
    
    Application.Volatile
    
    CellText = cel.Cells(1, 1).Text
    
End Function

Open in new window


Keep in mind that as you change the number format on a cell, despite the Application.Volatile you will not get a recalc...
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question