<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Atlas</title>
	<atom:link href="http://www.atlaspm.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.atlaspm.com</link>
	<description>Excel Training &#124; Testing &#124; Consulting</description>
	<lastBuildDate>Thu, 17 May 2012 05:43:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Tom&#8217;s Tutorials For Excel: Getting Unique Items From a List</title>
		<link>http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-getting-unique-items-from-a-list/</link>
		<comments>http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-getting-unique-items-from-a-list/#comments</comments>
		<pubDate>Mon, 30 Apr 2012 08:14:01 +0000</pubDate>
		<dc:creator>Tom Urtis</dc:creator>
				<category><![CDATA[Tom's Tutorials for Excel]]></category>
		<category><![CDATA[@TomUrtis/Atlas on Twitter]]></category>
		<category><![CDATA[atlas]]></category>
		<category><![CDATA[Atlas Program Management]]></category>
		<category><![CDATA[Atlas programing management]]></category>
		<category><![CDATA[Atlas Programming on Facebook]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[excel how to]]></category>
		<category><![CDATA[Excel VBA 24-Hour Trainer]]></category>
		<category><![CDATA[frequently asked questions about Excel]]></category>
		<category><![CDATA[innovative use of Excel]]></category>
		<category><![CDATA[Microsoft Excel]]></category>
		<category><![CDATA[Microsoft MVP]]></category>
		<category><![CDATA[Microsoft Office]]></category>
		<category><![CDATA[Tom Urtis]]></category>
		<category><![CDATA[Tom Urtis/ Atlas on facebook]]></category>
		<category><![CDATA[Tom's Tips for excel]]></category>

		<guid isPermaLink="false">http://www.atlaspm.com/?p=5516</guid>
		<description><![CDATA[Tom&#8217;s Tutorials For Excel: Getting Unique Items From a List In the following picture, you see a list of names, many of which are repeated 2, 3, or more times. Here&#8217;s how you can create a shorter list to show &#8230; <a href="http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-getting-unique-items-from-a-list/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>Tom&#8217;s Tutorials For Excel: Getting Unique Items From a List</strong></p>
<p>In the following picture, you see a list of names, many of which are repeated 2, 3, or more times. Here&#8217;s how you can create a shorter list to show each unique item only once.<br />
<br />
<a href="http://www.atlaspm.com/wp-content/uploads/2012/04/Original_List.png"><img src="http://www.atlaspm.com/wp-content/uploads/2012/04/Original_List.png" alt="" title="Original_List" width="361" height="423" class="aligncenter size-full wp-image-5517" /></a><br />
<br />
To create a list of unique names in column C based on the list of many repeated names in column A, follow these 3 steps:</p>
<p><strong>Step 1</strong><br />
Select any single cell in the list. In the above picture, cell A1 is selected.</p>
<p><strong>Step 2</strong><br />
From your keyboard, press the Alt key, and while doing so, press the D and F keys. Then, press the A key as shown in the next picture.<br />
<br />
<a href="http://www.atlaspm.com/wp-content/uploads/2012/04/Keyboard_AltDFA.png"><img src="http://www.atlaspm.com/wp-content/uploads/2012/04/Keyboard_AltDFA.png" alt="" title="Keyboard_AltDFA" width="697" height="214" class="aligncenter size-full wp-image-5518" /></a><br />
<br />
<strong>Step 3</strong><br />
You will see the Advanced Filter dialog box as shown below. Click to select the options for &#8220;Copy to another location&#8221; and &#8220;Unique records only&#8221;. In the Copy to field, you see that $C$1 is entered, which you can type in manually, or click into that field and then click cell C1. After that, click OK.<br />
<br />
<a href="http://www.atlaspm.com/wp-content/uploads/2012/04/AdvancedFilter.png"><img src="http://www.atlaspm.com/wp-content/uploads/2012/04/AdvancedFilter.png" alt="" title="AdvancedFilter" width="361" height="423" class="aligncenter size-full wp-image-5519" /></a><br />
<br />
And that&#8217;s it! Your list of unique items will be shown in column C similar to the next picture.<br />
<br />
<a href="http://www.atlaspm.com/wp-content/uploads/2012/04/CopiedList.png"><img src="http://www.atlaspm.com/wp-content/uploads/2012/04/CopiedList.png" alt="" title="CopiedList" width="361" height="423" class="aligncenter size-full wp-image-5520" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-getting-unique-items-from-a-list/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Tom&#8217;s Tutorials For Excel: What time is it *Really*? Ask the US Navy With a Web Query</title>
		<link>http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-what-time-is-it-really-ask-the-us-navy-with-a-web-query/</link>
		<comments>http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-what-time-is-it-really-ask-the-us-navy-with-a-web-query/#comments</comments>
		<pubDate>Thu, 19 Apr 2012 07:06:33 +0000</pubDate>
		<dc:creator>Tom Urtis</dc:creator>
				<category><![CDATA[Tom's Tutorials for Excel]]></category>
		<category><![CDATA[@TomUrtis/Atlas on Twitter]]></category>
		<category><![CDATA[atlas]]></category>
		<category><![CDATA[Atlas Program Management]]></category>
		<category><![CDATA[Atlas programing management]]></category>
		<category><![CDATA[Atlas Programming on Facebook]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[excel how to]]></category>
		<category><![CDATA[frequently asked questions about Excel]]></category>
		<category><![CDATA[innovative use of Excel]]></category>
		<category><![CDATA[Microsoft Excel]]></category>
		<category><![CDATA[Microsoft MVP]]></category>
		<category><![CDATA[Microsoft Office]]></category>
		<category><![CDATA[Tom Urtis]]></category>
		<category><![CDATA[Tom Urtis/ Atlas on facebook]]></category>

		<guid isPermaLink="false">http://www.atlaspm.com/?p=5500</guid>
		<description><![CDATA[Tom&#8217;s Tutorials For Excel: What time is it *Really*? Ask the US Navy With a Web Query What is today’s date, and what is the current time of day? Here, you create a Web query to import a display of &#8230; <a href="http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-what-time-is-it-really-ask-the-us-navy-with-a-web-query/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>Tom&#8217;s Tutorials For Excel: What time is it *Really*? Ask the US Navy With a Web Query</strong></p>
<p>What is today’s date, and what is the current time of day? Here, you create a Web query to import a display of the current day and time for several North American time zones.<br />
<br />
<a href="http://www.atlaspm.com/wp-content/uploads/2012/04/WebQuery_NavyTime.png"><img src="http://www.atlaspm.com/wp-content/uploads/2012/04/WebQuery_NavyTime.png" alt="" title="WebQuery_NavyTime" width="540" height="363" class="aligncenter size-full wp-image-5501" /></a><br />
<br />
I came up with this solution out of necessity a few years ago while developing a client project that called for no changes to be allowed in workbooks after certain dates and times. Some users were circumventing the rule by changing the system clock on their computers, so I used a reliable, external source by which to programmatically monitor actual dates and times. </p>
<p>You access the website to the United States Naval Observatory, where the day and time are recorded on the Master Clock of the United States Navy. The Web query will place the information onto Sheet1 from a macro named TimeAfterTime, similiar to what is shown in the above picture..<br />
</p>
<p><font color="black"><code>Sub TimeAfterTime()</font color="black"></code></p>
<p><font color="green"><code>'Open a With structure for the destination worksheet.</font color="green"></code><br />
<font color="black"><code>With Worksheets("Sheet1")</font color="black"></code></p>
<p><font color="green"><code>'Declare a String type variable for the web site address.</font color="green"></code><br />
<font color="black"><code>Dim strURL As String</font color="black"></code><br />
<font color="green"><code>'Define the web site address, from which the information</font color="green"></code><br />
<font color="green"><code>'will be imported to your worksheet.</font color="green"></code><br />
<font color="black"><code>strURL = "http://tycho.usno.navy.mil/cgi-bin/timer.pl"</font color="black"></code></p>
<p><font color="green"><code>'For consistency, I prefer to activate the worksheet</font color="green"></code><br />
<font color="green"><code>'that will receive the web data.</font color="green"></code><br />
<font color="green"><code>'Cell A1 is a convenient cell to situate yourself.</font color="green"></code><br />
<font color="black"><code>Application.Goto .Range("A1"), True</font color="black"></code></p>
<p><font color="green"><code>'Clear the cells in the worksheet so you know the data</font color="green"></code><br />
<font color="green"><code>'being imported will not be confused with other data</font color="green"></code><br />
<font color="green"><code>'you may have imported previously and not yet deleted.</font color="green"></code><br />
<font color="black"><code>Cells.Clear</font color="black"></code></p>
<p><font color="green"><code>'Open a With structure for the Add method of your new</font color="green"></code><br />
<font color="green"><code>'Query Table. The connection, URL, and destination sheet,</font color="green"></code><br />
<font color="green"><code>'and other information that follows, must be specified.</font color="green"></code><br />
<font color="black"><code>With .QueryTables.Add _</font color="black"></code><br />
<font color="black"><code>(Connection:="URL;" &#038; strURL, Destination:=.Range("A1"))</font color="black"></code><br />
<font color="black"><code>.BackgroundQuery = True</font color="black"></code><br />
<font color="black"><code>.TablesOnlyFromHTML = False</font color="black"></code><br />
<font color="black"><code>.Refresh BackgroundQuery:=False</font color="black"></code><br />
<font color="black"><code>.SaveData = True</font color="black"></code><br />
<font color="green"><code>'Close the With structure of Query Table's Add method.</font color="green"></code><br />
<font color="black"><code>End With</font color="black"></code></p>
<p><font color="green"><code>'Close the With structure for the destination worksheet.</font color="green"></code><br />
<font color="black"><code>End With</font color="black"></code></p>
<p><font color="black"><code>End Sub</font color="black"></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-what-time-is-it-really-ask-the-us-navy-with-a-web-query/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tom&#8217;s Tutorials For Excel: Locating Your PivotTable&#8217;s Occupied Range</title>
		<link>http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-locating-your-pivottables-occupied-range/</link>
		<comments>http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-locating-your-pivottables-occupied-range/#comments</comments>
		<pubDate>Tue, 17 Apr 2012 06:19:34 +0000</pubDate>
		<dc:creator>Tom Urtis</dc:creator>
				<category><![CDATA[Tom's Tutorials for Excel]]></category>
		<category><![CDATA[@TomUrtis/Atlas on Twitter]]></category>
		<category><![CDATA[atlas]]></category>
		<category><![CDATA[Atlas Program Management]]></category>
		<category><![CDATA[Atlas programing management]]></category>
		<category><![CDATA[Atlas Programming on Facebook]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[excel how to]]></category>
		<category><![CDATA[Excel VBA 24-Hour Trainer]]></category>
		<category><![CDATA[frequently asked questions about Excel]]></category>
		<category><![CDATA[innovative use of Excel]]></category>
		<category><![CDATA[Microsoft Excel]]></category>
		<category><![CDATA[Microsoft MVP]]></category>
		<category><![CDATA[Microsoft Office]]></category>
		<category><![CDATA[Tom Urtis]]></category>
		<category><![CDATA[Tom Urtis/ Atlas on facebook]]></category>

		<guid isPermaLink="false">http://www.atlaspm.com/?p=5456</guid>
		<description><![CDATA[Tom&#8217;s Tutorials For Excel: Locating Your PivotTable&#8217;s Occupied Range Here&#8217;s a macro to locate the first and last rows and columns, and the ranges being occupied by your pivottable. The (0, 0) notation after the Address property statements is to &#8230; <a href="http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-locating-your-pivottables-occupied-range/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>Tom&#8217;s Tutorials For Excel: Locating Your PivotTable&#8217;s Occupied Range</strong></p>
<p>Here&#8217;s a macro to locate the first and last rows and columns, and the ranges being occupied by your pivottable. The <code>(0, 0)</code> notation after the <code>Address</code> property statements is to omit the look of absolute &#8220;$&#8221; references for easier readability in the MessageBox.<br />
<br />
<a href="http://www.atlaspm.com/wp-content/uploads/2012/04/PivotTable_Location.png"><img src="http://www.atlaspm.com/wp-content/uploads/2012/04/PivotTable_Location.png" alt="" title="PivotTable_Location" width="635" height="602" class="aligncenter size-full wp-image-5457" /></a><br />
</p>
<pre>
Sub PivotTableRangeAreas()

With ActiveSheet.PivotTables(1)

Dim TopRow1 As Long, TopRow2 As Long, LastRow As Long
Dim LeftColumn As Long, RightColumn As Long

TopRow2 = .TableRange2.Row
With .TableRange1
TopRow1 = .Row
LastRow = .Rows.Count + .Row - 1
LeftColumn = .Column
RightColumn = .Columns.Count + .Column - 1
End With

MsgBox "The pivot table named " &#038; .Name &#038; vbCrLf &#038; _
"occupies these range elements:" &#038; vbCrLf &#038; vbCrLf &#038; _
"With the Report (Page) field: " &#038; vbCrLf &#038; _
.TableRange2.Address(0, 0) &#038; vbCrLf &#038; _
"Without the Report (Page) field: " &#038; vbCrLf &#038; _
.TableRange1.Address(0, 0) &#038; vbCrLf &#038; vbCrLf &#038; _
"First row, with the Report (Page) field: " &#038; TopRow2 &#038; vbCrLf &#038; _
"First row, without the Report (Page) field: " &#038; TopRow1 &#038; vbCrLf &#038; _
"Last row: " &#038; LastRow &#038; vbCrLf &#038; _
"Left column: " &#038; LeftColumn &#038; vbCrLf &#038; _
"Right column: " &#038; RightColumn, , "Pivot table location."

End With

End Sub
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-locating-your-pivottables-occupied-range/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tom&#8217;s Tutorials For Excel Videos: Explaining Array Formulas</title>
		<link>http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-videos-explaining-array-formulas/</link>
		<comments>http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-videos-explaining-array-formulas/#comments</comments>
		<pubDate>Mon, 16 Apr 2012 06:45:05 +0000</pubDate>
		<dc:creator>Tom Urtis</dc:creator>
				<category><![CDATA[Tom's TIps For Excel Videos]]></category>
		<category><![CDATA[Tom's Tutorials for Excel]]></category>
		<category><![CDATA[@TomUrtis/Atlas on Twitter]]></category>
		<category><![CDATA[atlas]]></category>
		<category><![CDATA[Atlas Program Management]]></category>
		<category><![CDATA[Atlas programing management]]></category>
		<category><![CDATA[Atlas Programming on Facebook]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[excel how to]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[frequently asked questions about Excel]]></category>
		<category><![CDATA[innovative use of Excel]]></category>
		<category><![CDATA[Microsoft Excel]]></category>
		<category><![CDATA[Microsoft MVP]]></category>
		<category><![CDATA[Microsoft Office]]></category>
		<category><![CDATA[Tom Urtis]]></category>
		<category><![CDATA[Tom Urtis/ Atlas on facebook]]></category>
		<category><![CDATA[Tom's Tips for excel]]></category>
		<category><![CDATA[Tom's Tips for Excel Video]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[Youtube]]></category>

		<guid isPermaLink="false">http://www.atlaspm.com/?p=5462</guid>
		<description><![CDATA[Tom&#8217;s Tutorials For Excel Videos: Explaining Array Formulas Here&#8217;s a video explaining what array formulas are, how to enter them, and a look behind the scenes to show how and why they work. Array formulas are a different animal, requiring &#8230; <a href="http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-videos-explaining-array-formulas/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>Tom&#8217;s Tutorials For Excel Videos: Explaining Array Formulas</strong></p>
<p>Here&#8217;s a video explaining what array formulas are, how to enter them, and a look behind the scenes to show how and why they work. Array formulas are a different animal, requiring extra care to understand how, when, and why it&#8217;s a good idea to use them.</p>
<p>As the video explains, an <i>array</i> is simply a collection of items. The items can be cell values (as this video demonstrates), or the items can be some other kind of data that Excel holds in memory, and then acts upon when called to do so.</p>
<p>An <i>array formula</i> is a special kind of formula that can perform multiple calculations simultaneously, on one or more items in the array.</p>
<p>There are two kinds of array formulas. They can return one value in one cell, as this video tip shows, or they can return several values in several cells, which I&#8217;ll cover in future video tips.</p>
<p>In the video, a range of data that is potentially hundreds of thousands of rows deep contains two columns whose pairs of numbers are being multipied with each other, then summed, all by a single array formula. This bypasses the need for helper formulas in another column, meaning a single array formula is doing the work of hundreds of thousands of non-array formulas.</p>
<p>In edit mode of any formula &#8212; and it&#8217;s shown with the array formulas in the video &#8212; you can select the arguments within the SUM function&#8217;s parentheses, press the F9 key, and observe how the array formula calculates and stores its items to display the final result you see in the cell.</p>
<p>Take some time to understand the basic logic of array formula construction. You&#8217;ll find array formulas to be a valuable tool in your Excel problem-solving set of skills.</p>
<p><iframe width="560" height="315" src="http://www.youtube.com/embed/Yr_xuLB5JHs" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-videos-explaining-array-formulas/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Tom&#8217;s Tips For Excel: Using an InputBox and Looping Dates for Copy and Sum</title>
		<link>http://www.atlaspm.com/toms-tutorials-for-excel/toms-tips-for-excel-using-an-inputbox-and-looping-dates-for-copy-and-sum/</link>
		<comments>http://www.atlaspm.com/toms-tutorials-for-excel/toms-tips-for-excel-using-an-inputbox-and-looping-dates-for-copy-and-sum/#comments</comments>
		<pubDate>Thu, 12 Apr 2012 07:17:45 +0000</pubDate>
		<dc:creator>Tom Urtis</dc:creator>
				<category><![CDATA[Tom's Tutorials for Excel]]></category>
		<category><![CDATA[@TomUrtis/Atlas on Twitter]]></category>
		<category><![CDATA[atlas]]></category>
		<category><![CDATA[Atlas Program Management]]></category>
		<category><![CDATA[Atlas programing management]]></category>
		<category><![CDATA[Atlas Programming on Facebook]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[excel how to]]></category>
		<category><![CDATA[Excel VBA 24-Hour Trainer]]></category>
		<category><![CDATA[frequently asked questions about Excel]]></category>
		<category><![CDATA[innovative use of Excel]]></category>
		<category><![CDATA[Microsoft Excel]]></category>
		<category><![CDATA[Microsoft MVP]]></category>
		<category><![CDATA[Microsoft Office]]></category>
		<category><![CDATA[Tom Urtis]]></category>
		<category><![CDATA[Tom Urtis/ Atlas on facebook]]></category>

		<guid isPermaLink="false">http://www.atlaspm.com/?p=5407</guid>
		<description><![CDATA[Tom&#8217;s Tips For Excel: Using an InputBox and Looping Dates for Copy and Sum In January I posted this example for using AutoFilter for dates. AutoFilter is usually quicker and more efficient but I wanted to show how an example &#8230; <a href="http://www.atlaspm.com/toms-tutorials-for-excel/toms-tips-for-excel-using-an-inputbox-and-looping-dates-for-copy-and-sum/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>Tom&#8217;s Tips For Excel: Using an InputBox and Looping Dates for Copy and Sum</strong></p>
<p>In January I posted <a href="http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-filtering-dates/"><font color="blue"><u>this example for using AutoFilter for dates</u></font color="blue"></a>. AutoFilter is usually quicker and more efficient but I wanted to show how an example of looping through dates by their year.</p>
<p>Here&#8217;s a collection of VBA examples, all rolled into this one macro, to demonstrate:<br />
• Using an InputBox with default argument.<br />
• Looping.<br />
• Identifying dates by their year.<br />
• Copying rows to another sheet.<br />
• Programmatically entering a dynamic formula.</p>
<p>In the first picture is a list of sales activity during a mishmash of various years. You provide an InputBox for the user to ferret out any particular year to be copied to Sheet2, and enter a dynamic SUM for the Income, Expense, and Net totals.<br />
<br />
<a href="http://www.atlaspm.com/wp-content/uploads/2012/04/OrriginalList_InputBox_EnterYear.png"><img src="http://www.atlaspm.com/wp-content/uploads/2012/04/OrriginalList_InputBox_EnterYear.png" alt="" title="OrriginalList_InputBox_EnterYear" width="632" height="297" class="aligncenter size-full wp-image-5408" /></a><br />
<br />
The second picture shows a result if year 2010 was entered in the InputBox, with a SUM formula selected that the macro produced.<br />
<br />
<a href="http://www.atlaspm.com/wp-content/uploads/2012/04/Sheet2_ListResult_Totals1.png"><img src="http://www.atlaspm.com/wp-content/uploads/2012/04/Sheet2_ListResult_Totals1.png" alt="" title="Sheet2_ListResult_Totals" width="629" height="309" class="aligncenter size-full wp-image-5421" /></a><br />
<br />
<strong>Here is the macro with explanatory comments in green.</strong><br />
<br />
<font color="black"><code>Sub CopyYear()</code></font color="black"></p>
<p><font color="green"><code>'Declare a String variable for the Year.</code></font color="green"><br />
<font color="black"><code>Dim strYear as String</code></font color="black"><br />
<font color="green"><code>'InputBox to ask for a Year number, default example 2010.</code></font color="green"><br />
<font color="black"><code>strYear = _</code></font color="black"><br />
<font color="black"><code>InputBox("Enter the four-digit year:", "Copy a year of data", "2010")</code></font color="black"></p>
<p><font color="green"><code>'If no year is entered or Cancel is clicked, exit sub.</code></font color="green"><br />
<font color="black"><code>If strYear = "" Then</code></font color="black"><br />
<font color="black"><code>MsgBox "You did not enter a year.", , "Cancelled."</code></font color="black"><br />
<font color="black"><code>Exit Sub</code></font color="black"><br />
<font color="black"><code>End If</code></font color="black"></p>
<p><font color="green"><code>'If the InputBox entry is not a four-digit number exit sub.</code></font color="green"><br />
<font color="black"><code>If Len(strYear) <> 4 Or IsNumeric(CStr(strYear)) = False Then</code></font color="black"><br />
<font color="black"><code>MsgBox "You need to enter a four-digit year," &#038; vbCrLf &#038; _</code></font color="black"><br />
<font color="black"><code>"example, 2010.", 48, "Not a valid entry."</code></font color="black"><br />
<font color="black"><code>Exit Sub</code></font color="black"><br />
<font color="black"><code>End If</code></font color="black"></p>
<p><font color="green"><code>'All reasonable precautions are complete.</code></font color="green"></p>
<p><font color="green"><code>'Turn off ScreenUpdating.</code></font color="green"><br />
<font color="black"><code>Application.ScreenUpdating = False</code></font color="black"></p>
<p><font color="green"><code>'Declare variables for row, last row, and cell range.</code></font color="green"><br />
<font color="black"><code>Dim xRow As Long, LastRow As Long, cell As Range</code></font color="black"><br />
<font color="green"><code>'Define xRow as 2 as the destination first row on Sheet2.</code></font color="green"><br />
<font color="green"><code>'Row 1 on Sheet2 will have header labels.</code></font color="green"><br />
<font color="black"><code>xRow = 2</code></font color="black"></p>
<p><font color="green"><code>'Open a With structure for Sheet2.</code></font color="green"><br />
<font color="black"><code>With Sheets("Sheet2")</code></font color="black"><br />
<font color="green"><code>'Clear all the cells on Sheet2 to start with a clean sheet.</code></font color="green"><br />
<font color="black"><code>.Cells.Clear</code></font color="black"><br />
<font color="green"><code>'Put your column headers on row 1 of Sheet2.</code></font color="green"><br />
<font color="black"><code>.Range("A1:E1").Value = _</code></font color="black"><br />
<font color="black"><code>Array("Widget ID", "Date", "Income", "Expenses", "Net")</code></font color="black"></p>
<p><font color="green"><code>'Open a For Each loop to examine each Constant cell (shorthand #2).</code></font color="green"><br />
<font color="green"><code>'in column B which is written as Columns(2).</code></font color="green"><br />
<font color="black"><code>For Each cell In Columns(2).SpecialCells(2)</code></font color="black"><br />
<font color="green"><code>'First, evaluate for the cell value being a date.</code></font color="green"><br />
<font color="black"><code>If IsDate(cell.Value) = True Then</code></font color="black"><br />
<font color="green"><code>'Next, evaluate the date being the same year as entered in the InputBox.</code></font color="green"><br />
<font color="black"><code>If Year(cell.Value) = strYear Then</code></font color="black"><br />
<font color="green"><code>'If the evaluations are True, copy that row to the next available row</code></font color="green"><br />
<font color="green"><code>'in Sheet2 by using the xRow variable.</code></font color="green"><br />
<font color="black"><code>Rows(cell.Row).Copy .Rows(xRow)</code></font color="black"><br />
<font color="green"><code>'Add a 1 to the xRow variable to identify the next available row,</code></font color="green"><br />
<font color="green"><code>'for the next True evaluation.</code></font color="green"><br />
<font color="black"><code>xRow = xRow + 1</code></font color="black"><br />
<font color="black"><code>End If</code></font color="black"><br />
<font color="black"><code>End If</code></font color="black"><br />
<font color="black"><code>Next cell</code></font color="black"></p>
<p><font color="green"><code>'Identify the last row of copied data on Sheet2.</code></font color="green"><br />
<font color="black"><code>LastRow = .Cells(Rows.Count, 1).End(xlUp).Row</code></font color="black"></p>
<p><font color="green"><code>'Enter header labels for totals.</code></font color="green"><br />
<font color="black"><code>.Range("G1:I1").Value = Array("Income", "Expenses", "Net")</code></font color="black"></p>
<p><font color="green"><code>'Place the SUM function in G2 for Income total from column C.</code></font color="green"><br />
<font color="black"><code>.Range("G2").FormulaR1C1 = "=SUM(R2C3:R" &#038; LastRow &#038; "C3)"</code></font color="black"><br />
<font color="green"><code>'Place the SUM function in H2 for Expenses total from column D.</code></font color="green"><br />
<font color="black"><code>.Range("H2").FormulaR1C1 = "=SUM(R2C4:R" &#038; LastRow &#038; "C4)"</code></font color="black"><br />
<font color="green"><code>'Place the SUM function in I2 for Net total from column E.</code></font color="green"><br />
<font color="black"><code>.Range("I2").FormulaR1C1 = "=SUM(R2C5:R" &#038; LastRow &#038; "C5)"</code></font color="black"></p>
<p><font color="green"><code>'Format G2:I2 as Accounting.</code></font color="green"><br />
<font color="black"><code>.Range("G2:I2").NumberFormat = _</code></font color="black"><br />
<font color="black"><code>"_($* #,##0_);_($* (#,##0);_($* ""-""_);_(@_)"</code></font color="black"></p>
<p><font color="green"><code>'Autofit the columns on Sheet2 for redability.</code></font color="green"><br />
<font color="black"><code>.Columns.AutoFit</code></font color="black"></p>
<p><font color="green"><code>'Turn ScreenUpdating back on.</code></font color="green"><br />
<font color="black"><code>Application.ScreenUpdating = True</code></font color="black"></p>
<p><font color="green"><code>'Advise the user the macro is completed, or that no rows were copied</code></font color="green"><br />
<font color="green"><code>'because no dates were found matching the year entered in the InputBox.</code></font color="green"><br />
<font color="black"><code>If xRow <> 2 Then</code></font color="black"><br />
<font color="black"><code>MsgBox "All the " &#038; strYear &#038; " rows have been copied" &#038; vbCrLf &#038; _</code></font color="black"><br />
<font color="black"><code>"to Sheet2, and summed for Income, Expense, and Net.", 64, "Complete."</code></font color="black"><br />
<font color="black"><code>Else</code></font color="black"><br />
<font color="black"><code>.Cells.Clear</code></font color="black"><br />
<font color="black"><code>MsgBox "No cells in column F had dates in year " &#038; strYear &#038; ".", 64, "FYI"</code></font color="black"><br />
<font color="black"><code>End If</code></font color="black"></p>
<p><font color="green"><code>'Close With structure for Sheet2.</code></font color="green"><br />
<font color="black"><code>End With</code></font color="black"><br />
<font color="black"><code>End Sub</code></font color="black"></p>
]]></content:encoded>
			<wfw:commentRss>http://www.atlaspm.com/toms-tutorials-for-excel/toms-tips-for-excel-using-an-inputbox-and-looping-dates-for-copy-and-sum/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tom&#8217;s Tutorials For Excel: Toggling the GETPIVOTDATA Function On and Off</title>
		<link>http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-toggling-the-getpivotdata-function-on-and-off/</link>
		<comments>http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-toggling-the-getpivotdata-function-on-and-off/#comments</comments>
		<pubDate>Wed, 11 Apr 2012 07:09:00 +0000</pubDate>
		<dc:creator>Tom Urtis</dc:creator>
				<category><![CDATA[Tom's Tutorials for Excel]]></category>
		<category><![CDATA[@TomUrtis/Atlas on Twitter]]></category>
		<category><![CDATA[atlas]]></category>
		<category><![CDATA[Atlas Program Management]]></category>
		<category><![CDATA[Atlas programing management]]></category>
		<category><![CDATA[Atlas Programming on Facebook]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[excel how to]]></category>
		<category><![CDATA[Excel VBA 24-Hour Trainer]]></category>
		<category><![CDATA[frequently asked questions about Excel]]></category>
		<category><![CDATA[innovative use of Excel]]></category>
		<category><![CDATA[Microsoft Excel]]></category>
		<category><![CDATA[Microsoft MVP]]></category>
		<category><![CDATA[Microsoft Office]]></category>
		<category><![CDATA[Tom Urtis]]></category>
		<category><![CDATA[Tom Urtis/ Atlas on facebook]]></category>

		<guid isPermaLink="false">http://www.atlaspm.com/?p=5387</guid>
		<description><![CDATA[Tom&#8217;s Tutorials For Excel: Toggling the GETPIVOTDATA Function On and Off When you are doing calculations in cells outside of a pivot table that involve cells inside of (that is, belonging to) a pivot table, sometimes you want just the &#8230; <a href="http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-toggling-the-getpivotdata-function-on-and-off/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>Tom&#8217;s Tutorials For Excel: Toggling the GETPIVOTDATA Function On and Off</strong></p>
<p>When you are doing calculations in cells outside of a pivot table that involve cells inside of (that is, belonging to) a pivot table, sometimes you want just the pivot table&#8217;s cell value, and other times you want the relative position and content of the cell with the <code>GETPIVOTDATA</code> function.</p>
<p>In the first picture, both examples are shown. In the first formula scenario, clicking into a pivot table cell while composing a formula in an outside cell invokes the <code>GETPIVOTDATA</code> function. The second formula shows the cell address (F5 in the example) that was &#8220;pointed and clicked&#8221; to help build the formula involving a pivot table cell.<br />
<br />
<a href="http://www.atlaspm.com/wp-content/uploads/2012/04/GetPivotData_On_Off.png"><img src="http://www.atlaspm.com/wp-content/uploads/2012/04/GetPivotData_On_Off.png" alt="" title="GetPivotData_On_Off" width="642" height="448" class="aligncenter size-full wp-image-5388" /></a></p>
<p></p>
<p>There are two ways to avoid Excel forcing the <code>GETPIVOTDATA</code> function upon your formulas. One way is to manually type the formula without using your mouse to select the pivot table cell.</p>
<p>Another way is to toggle (on or off) the <code>GETPIVOTDATA</code> function default action. How you do that depends on your version of Excel.</p>
<p><u>In Excel versions 2003 or before, as the next picture sequence shows:</u><br />
(1) From the worksheet menu, click Tools > Customize.<br />
(2) In the Customize dialog box, select the Commands tab.<br />
(3) In the Categories pane, select Data.<br />
(4) In the Commands pane, select Generate GetPivotData.<br />
(5) Use your mouse to drag the Generate GetPivotData icon to your command bar.<br />
(6) Close the Customize dialog.<br />
(7) As indicated by the red arrow next to the Generate GetPivotData icon you can click the icon to toggle the GetPivotData behavior on and off.<br />
<br />
<a href="http://www.atlaspm.com/wp-content/uploads/2012/04/Version2003_Generate_GetPivotData_Icon.png"><img src="http://www.atlaspm.com/wp-content/uploads/2012/04/Version2003_Generate_GetPivotData_Icon.png" alt="" title="Version2003_Generate_GetPivotData_Icon" width="630" height="1027" class="aligncenter size-full wp-image-5389" /></a></p>
<p>
<u>In Excel versions 2007 and after, the process is much simpler as shown below:</u><br />
(1) Select any cell in the pivot table.<br />
(2) Under PivotTable Tools, click Options > PivotTable > Options > Generate GetPivotData<br />
<br />
<a href="http://www.atlaspm.com/wp-content/uploads/2012/04/Version_2007_2010_Generate_GetPivotData_Ribbon.png"><img src="http://www.atlaspm.com/wp-content/uploads/2012/04/Version_2007_2010_Generate_GetPivotData_Ribbon.png" alt="" title="Version_2007_2010_Generate_GetPivotData_Ribbon" width="637" height="306" class="aligncenter size-full wp-image-5390" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-toggling-the-getpivotdata-function-on-and-off/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tom&#8217;s Tutorials For Excel: Event Code for Embedded Forms Controls</title>
		<link>http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-event-code-for-embedded-forms-controls/</link>
		<comments>http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-event-code-for-embedded-forms-controls/#comments</comments>
		<pubDate>Mon, 09 Apr 2012 07:03:30 +0000</pubDate>
		<dc:creator>Tom Urtis</dc:creator>
				<category><![CDATA[Tom's Tutorials for Excel]]></category>
		<category><![CDATA[@TomUrtis/Atlas on Twitter]]></category>
		<category><![CDATA[atlas]]></category>
		<category><![CDATA[Atlas Program Management]]></category>
		<category><![CDATA[Atlas programing management]]></category>
		<category><![CDATA[Atlas Programming on Facebook]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[excel how to]]></category>
		<category><![CDATA[frequently asked questions about Excel]]></category>
		<category><![CDATA[innovative use of Excel]]></category>
		<category><![CDATA[Microsoft Excel]]></category>
		<category><![CDATA[Microsoft MVP]]></category>
		<category><![CDATA[Microsoft Office]]></category>
		<category><![CDATA[Tom Urtis]]></category>
		<category><![CDATA[Tom Urtis/ Atlas on facebook]]></category>

		<guid isPermaLink="false">http://www.atlaspm.com/?p=5375</guid>
		<description><![CDATA[Tom&#8217;s Tutorials For Excel: Event Code for Embedded Forms Controls Commonly accepted wisdom has it that embedded controls from the Forms toolbar cannot be programmed for events, such as can be done for ActiveX controls. Here&#8217;s an example of a &#8230; <a href="http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-event-code-for-embedded-forms-controls/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>Tom&#8217;s Tutorials For Excel: Event Code for Embedded Forms Controls</strong></p>
<p>Commonly accepted wisdom has it that embedded controls from the Forms toolbar cannot be programmed for events, such as can be done for ActiveX controls.</p>
<p>Here&#8217;s an example of a Forms List Box reacting to a double-click event.<br />
Attached to the Forms List Box is the macro named <code>NoDblClick</code>.<br />
<a href='http://www.atlaspm.com/wp-content/uploads/2012/04/DoubleClickEvent_FormsControl.zip'><font color="blue"><u>A downloadable workbook is here.</u></font color="blue"></a><br />
<br />
<a href="http://www.atlaspm.com/wp-content/uploads/2012/04/DoubleClickEvent_FormsControl.png"><img src="http://www.atlaspm.com/wp-content/uploads/2012/04/DoubleClickEvent_FormsControl.png" alt="" title="DoubleClickEvent_FormsControl" width="426" height="366" class="aligncenter size-full wp-image-5376" /></a><br />
<br />
<strong>In the worksheet module:</strong></p>
<pre>
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Run "ResetDblClick"
End Sub
</pre>
<p><strong>In the workbook module:</strong></p>
<pre>
Private Sub Workbook_DeActivate()
Run "ResetDblClick"
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Run "ResetDblClick"
End Sub
</pre>
<p><strong>In a standard module:</strong></p>
<pre>
Sub NoDblClick()
Application.OnDoubleClick = "ListBoxEexcute"
End Sub

Sub ListBoxEexcute()
If ActiveSheet.ListBoxes(Application.Caller).Name = "List Box 130" Then
Dim i As Integer
With ActiveSheet.ListBoxes("List Box 130")
For i = 1 To .ListCount
If .Selected(i) = True Then .Selected(i) = False
Next i
End With
MsgBox "Hey, I'm a Forms control and I was just double-clicked!", , _
"Forms double-click event example."
End If
End Sub

Sub ResetDblClick()
Application.OnDoubleClick = ""
End Sub
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-event-code-for-embedded-forms-controls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tom&#8217;s Tips For Excel Videos: Filling Empty Cells With Value From Above</title>
		<link>http://www.atlaspm.com/toms-tutorials-for-excel/toms-tips-for-excel-videos-filling-empty-cells-with-value-from-above/</link>
		<comments>http://www.atlaspm.com/toms-tutorials-for-excel/toms-tips-for-excel-videos-filling-empty-cells-with-value-from-above/#comments</comments>
		<pubDate>Fri, 06 Apr 2012 06:13:10 +0000</pubDate>
		<dc:creator>Tom Urtis</dc:creator>
				<category><![CDATA[Tom's TIps For Excel Videos]]></category>
		<category><![CDATA[Tom's Tutorials for Excel]]></category>
		<category><![CDATA[@TomUrtis/Atlas on Twitter]]></category>
		<category><![CDATA[atlas]]></category>
		<category><![CDATA[Atlas Program Management]]></category>
		<category><![CDATA[Atlas programing management]]></category>
		<category><![CDATA[Atlas Programming on Facebook]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[excel how to]]></category>
		<category><![CDATA[frequently asked questions about Excel]]></category>
		<category><![CDATA[innovative use of Excel]]></category>
		<category><![CDATA[Microsoft Excel]]></category>
		<category><![CDATA[Microsoft MVP]]></category>
		<category><![CDATA[Microsoft Office]]></category>
		<category><![CDATA[Tom Urtis]]></category>
		<category><![CDATA[Tom Urtis/ Atlas on facebook]]></category>
		<category><![CDATA[Tom's Tips for excel]]></category>
		<category><![CDATA[Tom's Tips for Excel Video]]></category>

		<guid isPermaLink="false">http://www.atlaspm.com/?p=5365</guid>
		<description><![CDATA[Tom&#8217;s Tips For Excel Videos: Filling Empty Cells With Value From Above Sometimes you get data in a column which has a lot of blank cells that represent whatever text was in the last filled cell above them. When you &#8230; <a href="http://www.atlaspm.com/toms-tutorials-for-excel/toms-tips-for-excel-videos-filling-empty-cells-with-value-from-above/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>Tom&#8217;s Tips For Excel Videos: Filling Empty Cells With Value From Above</strong></p>
<p>Sometimes you get data in a column which has a lot of blank cells that represent whatever text was in the last filled cell above them.</p>
<p>When you need to fill in hundreds or thousands of empty cells, here&#8217;s a video tip showing how to do it quickly and easily.<br />
<br />
<iframe width="420" height="315" src="http://www.youtube.com/embed/7l1_814-LIY" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.atlaspm.com/toms-tutorials-for-excel/toms-tips-for-excel-videos-filling-empty-cells-with-value-from-above/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Tom&#8217;s Tutorials For Excel: Filtering Automatically On Cell Entry</title>
		<link>http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-filtering-automatically-on-cell-entry/</link>
		<comments>http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-filtering-automatically-on-cell-entry/#comments</comments>
		<pubDate>Thu, 05 Apr 2012 08:21:57 +0000</pubDate>
		<dc:creator>Tom Urtis</dc:creator>
				<category><![CDATA[Tom's Tutorials for Excel]]></category>
		<category><![CDATA[@TomUrtis/Atlas on Twitter]]></category>
		<category><![CDATA[atlas]]></category>
		<category><![CDATA[Atlas Program Management]]></category>
		<category><![CDATA[Atlas programing management]]></category>
		<category><![CDATA[Atlas Programming on Facebook]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[excel how to]]></category>
		<category><![CDATA[frequently asked questions about Excel]]></category>
		<category><![CDATA[innovative use of Excel]]></category>
		<category><![CDATA[Microsoft Excel]]></category>
		<category><![CDATA[Microsoft MVP]]></category>
		<category><![CDATA[Tom Urtis]]></category>
		<category><![CDATA[Tom Urtis/ Atlas on facebook]]></category>

		<guid isPermaLink="false">http://www.atlaspm.com/?p=5259</guid>
		<description><![CDATA[Tom&#8217;s Tutorials For Excel: Filtering Automatically On Cell Entry Here&#8217;s a developer&#8217;s approach to make things easy for your users who need to filter a range of data, based on a value they enter in a criteria cell. A Worksheet_Change &#8230; <a href="http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-filtering-automatically-on-cell-entry/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>Tom&#8217;s Tutorials For Excel: Filtering Automatically On Cell Entry</strong></p>
<p>Here&#8217;s a developer&#8217;s approach to make things easy for your users who need to filter a range of data, based on a value they enter in a criteria cell. A <code>Worksheet_Change</code> event is utilized on a worksheet that is designed for this purpose, as seen in the picture. When the user enters a value in a pink cell, the table below it will be filtered on that column for that value. If the entered value does not exist in the table, a friendly message box will advise the user.</p>
<p><a href="http://www.atlaspm.com/wp-content/uploads/2012/04/AutoFilter_CellEntryExamples1.png"><img src="http://www.atlaspm.com/wp-content/uploads/2012/04/AutoFilter_CellEntryExamples1.png" alt="" title="AutoFilter_CellEntryExamples" width="643" height="475" class="aligncenter size-full wp-image-5267" /></a><br />
<br />
This is a worksheet level Change event procedure. To install it:<br />
(1) Right-click on your worksheet tab and left-click to select View Code.<br />
(2) Enter or paste the procedure into the large white area that is the worksheet module.<br />
(3) Press Alt+Q to return to the worksheet.<br />
<br />
<font color="black"><code>Private Sub Worksheet_Change(ByVal Target As Range)</code></font color="black"></p>
<p><font color="green"><code>'Open With structure for Target range object.</code></font color="green"><br />
<font color="black"><code>With Target</code></font color="black"></p>
<p><font color="green"><code>'If the cell being changes is not A2, B2, or C2 then Exit Sub.</code></font color="green"><br />
<font color="black"><code>If Intersect(Target, Range("A2:C2")) Is Nothing Then Exit Sub</code></font color="black"><br />
<font color="green"><code>'If more than one cell is attempted to be changed then Exit Sub.</code></font color="green"><br />
<font color="black"><code>If .Cells.Count > 1 Then Exit Sub</code></font color="black"></p>
<p><font color="green"><code>'If the Delete key is pressed, remove AutoFilter.</code></font color="green"><br />
<font color="black"><code>If IsEmpty(Target) Then</code></font color="black"><br />
<font color="black"><code>ActiveSheet.AutoFilterMode = False</code></font color="black"><br />
<font color="black"><code>Exit Sub</code></font color="black"><br />
<font color="black"><code>End If</code></font color="black"></p>
<p><font color="green"><code>'Declare a String type variable for the value that was entered,</code></font color="green"><br />
<font color="green"><code>'and define the String variable.</code></font color="green"><br />
<font color="black"><code>Dim strFilter As String</code></font color="black"><br />
<font color="black"><code>strFilter = .Value</code></font color="black"><br />
<font color="green"><code>'Declare an Integer type variable for the column of the cell</code></font color="green"><br />
<font color="green"><code>'that the value was entered, and define the column.</code></font color="green"><br />
<font color="black"><code>Dim intColumn As Integer</code></font color="black"><br />
<font color="black"><code>intColumn = .Column</code></font color="black"><br />
<font color="green"><code>'Declare a Long type variable for the last used row among</code></font color="green"><br />
<font color="green"><code>'columns A, B, and C, and define that last row number.</code></font color="green"><br />
<font color="black"><code>Dim LastRow As Long</code></font color="black"><br />
<font color="black"><code>LastRow = _</code></font color="black"><br />
<font color="black"><code>Range("A:C").Find(What:="*", After:=Range("A1"), _</code></font color="black"><br />
<font color="black"><code>SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row</code></font color="black"></p>
<p><font color="green"><code>'Close the With structure.</code></font color="green"><br />
<font color="black"><code>End With</code></font color="black"></p>
<p><font color="green"><code>'Do some housekeeping: delete values that may still be in the</code></font color="green"><br />
<font color="green"><code>'other criteria cells. Set EnableEvents to False and back to True.</code></font color="green"><br />
<font color="black"><code>Application.EnableEvents = False</code></font color="black"><br />
<font color="black"><code>If intColumn = 1 Then</code></font color="black"><br />
<font color="black"><code>Range("B2:C2").ClearContents</code></font color="black"><br />
<font color="black"><code>ElseIf intColumn = 2 Then</code></font color="black"><br />
<font color="black"><code>Range("A2, C2").ClearContents</code></font color="black"><br />
<font color="black"><code>Else</code></font color="black"><br />
<font color="black"><code>Range("A2:B2").ClearContents</code></font color="black"><br />
<font color="black"><code>End If</code></font color="black"><br />
<font color="black"><code>Application.EnableEvents = True</code></font color="black"></p>
<p><font color="green"><code>'Before attempting to filter anything, first see if the value</code></font color="green"><br />
<font color="green"><code>'that was entered exists in the relevant column.</code></font color="green"><br />
<font color="green"><code>'If it does not, end the procedure and advise the user.</code></font color="green"><br />
<font color="black"><code>If WorksheetFunction.CountIf(Range(Cells(5, intColumn), _</code></font color="black"><br />
<font color="black"><code>Cells(LastRow, intColumn)), strFilter) = 0 Then</code></font color="black"><br />
<font color="black"><code>MsgBox "This column does not contain " &#038; strFilter, 48, "No such animal."</code></font color="black"><br />
<font color="black"><code>ActiveSheet.AutoFilterMode = False</code></font color="black"><br />
<font color="black"><code>Exit Sub</code></font color="black"><br />
<font color="black"><code>End If</code></font color="black"></p>
<p><font color="green"><code>'Now, all the reasonable preparations are completed.</code></font color="green"><br />
<font color="green"><code>'Execute the filter.</code></font color="green"><br />
<font color="black"><code>ActiveSheet.AutoFilterMode = False</code></font color="black"><br />
<font color="black"><code>Range(Cells(4, intColumn), _</code></font color="black"><br />
<font color="black"><code>Cells(LastRow, intColumn)).AutoFilter _</code></font color="black"><br />
<font color="black"><code>Field:=1, Criteria1:=strFilter</code></font color="black"></p>
<p><font color="green"><code>'As a convenience to the user, activate cell A1.</code></font color="green"><br />
<font color="black"><code>Application.Goto Range("A1"), 1</code></font color="black"></p>
<p><font color="black"><code>End Sub</code></font color="black"></p>
]]></content:encoded>
			<wfw:commentRss>http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-filtering-automatically-on-cell-entry/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tom&#8217;s Tutorials For Excel: Why Reset ScreenUpdating to True? Here&#8217;s Why!</title>
		<link>http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-why-reset-screenupdating-to-true-heres-why/</link>
		<comments>http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-why-reset-screenupdating-to-true-heres-why/#comments</comments>
		<pubDate>Tue, 03 Apr 2012 07:13:06 +0000</pubDate>
		<dc:creator>Tom Urtis</dc:creator>
				<category><![CDATA[Tom's Tutorials for Excel]]></category>
		<category><![CDATA[@TomUrtis/Atlas on Twitter]]></category>
		<category><![CDATA[atlas]]></category>
		<category><![CDATA[Atlas Program Management]]></category>
		<category><![CDATA[Atlas programing management]]></category>
		<category><![CDATA[Atlas Programming on Facebook]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[frequently asked questions about Excel]]></category>
		<category><![CDATA[innovative use of Excel]]></category>
		<category><![CDATA[Microsoft Excel]]></category>
		<category><![CDATA[Microsoft MVP]]></category>
		<category><![CDATA[Microsoft Office]]></category>
		<category><![CDATA[Tom Urtis]]></category>
		<category><![CDATA[Tom Urtis/ Atlas on facebook]]></category>

		<guid isPermaLink="false">http://www.atlaspm.com/?p=5252</guid>
		<description><![CDATA[Why Reset ScreenUpdating to True? Here&#8217;s Why! Occasionally a parroted claim will pop up in the Excel cybersphere that resetting ScreenUpdating from False back to True in a VBA procedure is pointless and unnecessary. Supporters of this claim mistakenly believe &#8230; <a href="http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-why-reset-screenupdating-to-true-heres-why/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>Why Reset ScreenUpdating to True? Here&#8217;s Why!</strong></p>
<p>Occasionally a parroted claim will pop up in the Excel cybersphere that resetting ScreenUpdating from False back to True in a VBA procedure is pointless and unnecessary. Supporters of this claim mistakenly believe that VBA &#8220;resets itself&#8221; at the end of a macro or procedure, and/or not resetting ScreenUpdating to True has no bad effects.</p>
<p>Do not believe these claims &#8212; they are misinformed and dead wrong. Whenever you set ScreenUpdating to False in your code, make certain to reset it to True. Here&#8217;s why:</p>
<p>First, no matter what the help files may say, or what you may have heard, ScreenUpdating does not always reset itself, including where UserForms and User Defined Functions are concerned. Part of the confusion about this topic comes from versions 2000 and before, when it was not necessary to set ScreenUpdating back to True. No longer the case starting with version 2002. Code writers who did not reset ScreenUpdating to True before 2002 had to go back to their macros and do so.</p>
<p>Second, resetting ScreenUpdating to True is a wise practice to cover your bases. If for example the macro errors out or is interrupted before it completes, ScreenUpdating would still be off while Excel is running. Future versions of Excel will invariably support new, or stop supporting existing, VBA methods and properties, so it&#8217;s an unnecessary risk to not reset ScreenUpdating.</p>
<p>Third, there might be times when you are running code in sequence and you want to see what you did while you are doing it. See the following three macros. Macros Two and Three are called by Macros One and Two, but you cannot see the results of your code until the last macro is completed, unless you had set the ScreenUpdating back to the way it was in each macro. It bears mentioning in this case that the message boxes give that wild effect if you drag them while ScreenUpdating is False, very sloppy, all the more reason to set things back to normal as you go.</p>
<pre>Sub One()
Application.ScreenUpdating = True
MsgBox "Screen Updating is on."
Range("A1:A3").ClearContents
Range("A1").Value = "One"
Application.ScreenUpdating = False
MsgBox "Screen Updating is off now !!"
Two
End Sub

Sub Two()
Range("A2").Value = "Two"
MsgBox "ScreenUpdating is " &#038; Application.ScreenUpdating
Three
End Sub

Sub Three()
Range("A3").Value = "Three"
MsgBox "ScreenUpdating is " &#038; Application.ScreenUpdating
End Sub</pre>
<p>Fourth, good code writing in my opinion involves good citizenship and an awareness of perception. If you change the setting of something, then when you are through, set it back to the way it was before. Whatever I set, I reset. Whatever I define, I undefine. You never know when the next version from Microsoft will make you wish you had the good sense to keep things in order from the start. It&#8217;s sloppy coding to not re-set what you changed. Fair or not, just as people are judged by how they write and speak, programmers are judged by the quality of their code, and seen to look lazy and VBA-ignorant when not re-setting the application.</p>
<p>There are too many bad possible outcomes that you would not know about until they happen. Platforms; IT settings; UDFs; fatal errors occurring from unforeseen reasons (but they&#8217;d seem obvious after they happen when first unforeseen); the list goes on. Not setting ScreenUpdating to True is a bad risk. I cannot tell you how many times in my work I&#8217;ve come across a potential bad outcome were the True setting not reset.</p>
<p>Whether the end of a macro comes from the expected process of events or through error handling, please always ensure you have reset ScreenUpdating to True if you had previously set to False.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-why-reset-screenupdating-to-true-heres-why/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

