Solved

Reference value as shown

Posted on 2013-02-04
2
153 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 92

Accepted Solution

by:
Patrick Matthews earned 500 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

615 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