<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><!-- InstanceBegin template="/Templates/book_pages_template.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Microsoft Excel Tips / Excel Tutorial / Excel Spreadsheet Help / Excel Tip .com</title>
<!-- InstanceEndEditable --> 
<style><!--
.MsoBodyText
	{text-align:justify;
	line-height:14.0pt;
	font-size:10.0pt;
	font-family:Arial;
	letter-spacing:.25pt;}
.MsoBodyTextIndent
	{text-align:justify;
	line-height:14.0pt;
	font-size:10.0pt;
	font-family:Arial;
	letter-spacing:.25pt;
	font-weight:bold;}
.MsoBodyText2
	{text-align:justify;
	line-height:14.0pt;
	font-size:10.0pt;
	font-family:Arial;
	letter-spacing:.25pt;}
.listnumber
	{text-align:justify;
	line-height:14.0pt;
	font-size:10.0pt;
	font-family:Arial;
	letter-spacing:.25pt;}
.problemsolution
	{line-height:14.0pt;
	font-size:12.0pt;
	font-family:Arial;
	color:#636363;
	letter-spacing:.25pt;
	text-shadow:auto;
	font-weight:bold;}
.Chapter
	{text-align:center;
	font-size:20.0pt;
	font-family:Arial;
	letter-spacing:.25pt;
	text-shadow:auto;
	font-weight:bold;}
.HeaderEven
	{line-height:14.0pt;
	tab-stops:center 207.65pt right 415.3pt;
	font-size:10.0pt;
	font-family:Arial;
	letter-spacing:.25pt;}
.HeaderOdd
	{text-align:justify;
	line-height:14.0pt;
	tab-stops:center 207.65pt right 415.3pt;
	font-size:10.0pt;
	font-family:Arial;
	letter-spacing:.25pt;}
.Section1
	{page:Section1;}
.Section2
	{page:Section2;}
-->
</style>
<!-- \/--OPTIMIZATION BY: IRUBIN CONSULTING --------------------------------------------------\/ -->
<meta name="description" content="">
<meta name="keywords" content="">

<meta name="robots" content="all">
<meta name="revisit-after" content="15 days">
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.weburbia.com/safe/ratings.htm" l r (s 0))'>
<meta name="Classification" content="Microsoft Excel, Excel Spreadsheet, Excel Tips and Tricks, Microsoft Office">
<meta name="Copyright" content="2002 copyright">
<meta name="MSSmartTagsPreventParsing" content="TRUE">
<!-- /\------------------------------------------------------------/\ -->
<link rel="stylesheet" href="/css/main.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
</head>

<body bgcolor="#F79300" text="#333333" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<!--#include virtual="/cgi-bin/engine.pl?action=header"-->

<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td width="100%" valign="top" class="mtdleft">
	    <table border="0" cellspacing="0" cellpadding="0" align="right">
  <tr>
    <td >
              		  <object width="120" height="600">
              <param name="movie" value="/swf/exceltipflash_vertical.swf">
              <param name="quality" value="high">
              <embed src="/swf/exceltipflash_vertical.swf" quality="high" width="120" height="600"></embed>
			  </object> 
            </td>
  </tr>
</table>

	  <!-- InstanceBeginEditable name="Main Content Area" -->
	 <p align="center"><font class="chaptertitle">Chapter 7 continued ...</font><br>
        </p>
	<p class=head-3 >&nbsp;</p>
<div align=left >
  <table border=0 cellspacing=0 cellpadding=0>
    <tr>
      <td width=64 valign=top class="Normal"> <p > <img width=28 height=45
  src="images/image047.jpg" v:shapes="_x0000_i1042"> </p></td>
      <td width=399 valign=top class="Normal"> <h1 ><a name="_Toc25998318">Tip
          – Quickly delete the formula without deleting the calculation result</a></h1>
        <p >Select a cell containing a formula, press <b>F2</b> and then
          press <b>F9</b>.</p></td>
    </tr>
  </table>
</div>
<p class=head-3 ><a name="_Toc25863170"></a><a name="_Toc26773957">Deleting
  formulas and pasting values using a single line of code and a keyboard shortcut</a></p>
<p >Record a macro adding a Shortcut Key and save the macro in a Personal
  workbook. Enter the following code to the macro you created:</p>
<p >Selection.Formulas=Selection.Value</p>
<p class=head-2 ><a name="_Toc25863171"></a><a name="_Toc26773958">Selecting
  Cells with Formulas</a></p>
<p > <img width=186 height=242
src="images/image049.jpg" align=left hspace=12 v:shapes="_x0000_s1362">
  Use the <b>Go To </b>dialog box to select formulas in a sheet to delete, to
  protect (see below), or to color.</p>
<p class=listnumber align=left  style='text-align:
left;'> 1.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>
  Press <b>F5</b>, or from the <b>Edit </b>menu, select <b>Go to</b>.</p>
<p class=listnumber align=left  style='text-align:
left;'> 2.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>
  In the <b>Go to</b> dialog box, click <b>Special</b>.</p>
<p class=listnumber align=left  style='text-align:
left;'> 3.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>
  Select <b>Formulas</b>.</p>
<p class=listnumber align=left  style='text-align:
left;'> 4.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>
  Click <b>OK</b>.</p>
<p >Only cells that contain formulas are selected in the sheet.</p>
<p class=head-2 ><a name="_Toc25863172"></a><a
name="_Toc26773959">Identifying and Formatting Cells with Formulas</a></p>
<p >Excel does not provide a formula that identifies formulas. VBA has
  a function called HasFormula. The solution is to create a custom function (see
  explanation at end of chapter) to identify a cell containing a formula. </p>
<p align=left  style='text-align:left;line-height:13.0pt'><span
style='font-family:"Courier New";letter-spacing:0pt'>Function FormulaInCell(Cell)
  As Boolean</span></p>
<p align=left  style='text-align:left;
line-height:13.0pt'><span style='font-family:"Courier New";letter-spacing:0pt'>FormulaInCell
  = Cell.HasFormula</span></p>
<h5  style='letter-spacing:0pt;font-weight:normal'>End Function</h5>
<p class=MsoBodyTextIndent ><span style='font-weight:normal'>Use the technique
  described below to combine the Get.Cell formula with conditional formatting
  to format cells containing formulas. After creating the formula FormulaInCell,
  combine it with Conditional Formatting.</span></p>
<p align=center  style='text-align:center'> <img width=441 height=132
src="images/image051.jpg" v:shapes="_x0000_i1043"> </p>
<p class=head-3 ><a name="_Toc25863173"></a><a name="_Toc26773960">Combining
  the Get.Cell formula and conditional formatting to format a cell with a formula</a></p>
<p class=HeaderOdd >Excel includes the macro language XLM. This macro language
  has a function called Get.Cell. Use this function to identify a formula in a
  cell by combining it with conditional formatting. The technique is described
  below.</p>
<p class=listnumber > 1.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>
  Select a cell in the sheet, and press <b>Ctrl+F3</b>.</p>
<p class=listnumber > 2.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>
  In the <b>Define Name </b>dialog box, type the name FormulaInCell.</p>
<p class=listnumber > 3.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>
  Type the formula =GET.CELL(48,INDIRECT(“rc”,FALSE)) in the <b>Reference </b>field.</p>
<p align=center  style='text-align:center'> <img width=411 height=249
src="images/image053.jpg" v:shapes="_x0000_i1044"> </p>
<p class=listnumber > 4.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>
  Select all the cells in the sheet by pressing <b>Ctrl+A</b>.</p>
<p class=listnumber > 5.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>
  From the <b>Format</b> menu, select <b>Conditional formatting</b>.</p>
<p class=listnumber > 6.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>
  In <b>Condition 1</b>, select <b>Formula is</b>.</p>
<p class=listnumber > 7.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>
  In the formula box, type =FormulaInCell.</p>
<p class=listnumber > 8.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>
  Click <b>Format</b>.</p>
<p class=listnumber > 9.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>
  From the <b>Font</b> tab, select the color <b>yellow</b>, and click <b>OK</b>.</p>
<p class=listnumber > 10.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span> Click <b>OK</b>.</p>
<p align=center  style='text-align:center'> <img width=437 height=130
src="images/image055.gif" v:shapes="_x0000_i1045"> </p>
  <p >&nbsp;</p>
      <p align="center"><a href="/excel_book/chapter7/p7.html">PREVIOUS</a> &nbsp;<a href="/excel_book/chapter7/p1.html">1</a>
        <a href="/excel_book/chapter7/p2.html">2</a> <a href="/excel_book/chapter7/p3.html">3</a>
        <a href="/excel_book/chapter7/p4.html">4</a> <a href="/excel_book/chapter7/p5.html">5</a>
        <a href="/excel_book/chapter7/p6.html">6</a> <a href="/excel_book/chapter7/p7.html">7</a>
        <a href="/excel_book/chapter7/p8.html">8</a> <a href="/excel_book/chapter7/p9.html">9</a>
        &nbsp;&nbsp;<a href="/excel_book/chapter7/p9.html">NEXT</a></p>

	<!-- InstanceEndEditable --> 
    </td>
	      
    <td valign="top" class="mtdright">
	
	<!--#include virtual="/cgi-bin/engine.pl?action=right_side"-->


	 </td>
  </tr>
</table>
<!--#include virtual="/cgi-bin/engine.pl?action=footer"-->


</body>
<!-- InstanceEnd --></html>
