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
Solved

Reference value as shown

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
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 how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

829 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