Solved

Reference value as shown

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

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

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;…
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

679 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