<?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>arcster.com Blog &#187; Excel</title>
	<atom:link href="http://blog.arcster.com/blog/index.php/category/microsoft/excel/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.arcster.com</link>
	<description>These fragments I have shored against my ruins</description>
	<lastBuildDate>Sun, 11 Sep 2011 00:05:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>more cool Excel formulae</title>
		<link>http://blog.arcster.com/2011/02/more-cool-excel-formulae/</link>
		<comments>http://blog.arcster.com/2011/02/more-cool-excel-formulae/#comments</comments>
		<pubDate>Wed, 02 Feb 2011 13:40:16 +0000</pubDate>
		<dc:creator>arcster</dc:creator>
				<category><![CDATA[Excel]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://arcster.com/blog/?p=242</guid>
		<description><![CDATA[So I have some Excel data that looks like this: Team days RB 3 RBB 6 RBC 9 RA 100 RA 114 RAX 125 and in my Sheet2 worksheet I want to show the averages of the days each team &#8230; <a href="http://blog.arcster.com/2011/02/more-cool-excel-formulae/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So I have some Excel data that looks like this:</p>
<table>
<tbody>
<tr>
<td>Team</td>
<td>days</td>
</tr>
<tr>
<td>RB</td>
<td>3</td>
</tr>
<tr>
<td>RBB</td>
<td>6</td>
</tr>
<tr>
<td>RBC</td>
<td>9</td>
</tr>
<tr>
<td>RA</td>
<td>100</td>
</tr>
<tr>
<td>RA</td>
<td>114</td>
</tr>
<tr>
<td>RAX</td>
<td>125</td>
</tr>
</tbody>
</table>
<p>and in my Sheet2 worksheet I want to show the averages of the days each team higher level team (i.e., the RAs, the RBs, etc.) spent. I horsed around with AVERGEIF and DAVERAGE and LEFT, but got nowhere.</p>
<p>Finally came up with:</p>
<pre>=SUMIF(Sheet1!$D:$D,A4,Sheet1!$E:$E)/COUNTIF(Sheet1!$D:$D,A4)</pre>
<p>Where A4 contains &#8220;RA*&#8221;</p>
<p>I also could have done</p>
<pre>=SUMIF(Sheet1!$D:$D,A4&amp;"*",Sheet1!$E:$E)/COUNTIF(Sheet1!$D:$D,A4&amp;"*")</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.arcster.com/2011/02/more-cool-excel-formulae/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dumping file info into an Excel spreadsheet</title>
		<link>http://blog.arcster.com/2010/06/dumping-file-info-into-an-excel-spreadsheet/</link>
		<comments>http://blog.arcster.com/2010/06/dumping-file-info-into-an-excel-spreadsheet/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 20:22:36 +0000</pubDate>
		<dc:creator>arcster</dc:creator>
				<category><![CDATA[Excel]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[VBA]]></category>

		<guid isPermaLink="false">http://arcster.com/blog/?p=190</guid>
		<description><![CDATA[So you&#8217;ve got a folder full of documents and you want to know what&#8217;s in the folder, how big the files are, and when they were last modified? And of course you want to be able to filter and sort &#8230; <a href="http://blog.arcster.com/2010/06/dumping-file-info-into-an-excel-spreadsheet/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So you&#8217;ve got a folder full of documents and you want to know what&#8217;s in the folder, how big the files are, and when they were last modified? And of course you want to be able to filter and sort the list. And throw in a spiffy GUI to get your base folder!</p>
<p>How about a little recursive Excel macro that will do the job for you? Before Office 2007 came along, I had a macro that used Application.FileSearch to do the job. But that is apparently no longer supported. You need the FileSystemObject.</p>
<p>So create an Excel workbook with macros enabled (i.e., ending with .xslm)</p>
<p>Open your VB window, go to Tools &gt; References&#8230; and check the Microsoft Scripting Runtime option. If you don&#8217;t see it listed, click Browse and navigate to C:\Windows\System32\scrrun.dll</p>
<p>Create a macro and paste the following code</p>
<p><code><br />
Sub myFileSearch()<br />
Dim objFSO As Scripting.FileSystemObject<br />
'Dim myFSO As FileSearch<br />
'Dim myFSO As String<br />
Dim foundFile As String<br />
Dim myofficeobject As Object<br />
Dim myfilename As String<br />
Dim objFolder As Folder<br />
Dim objFile As File<br />
Dim GetLookIn As String</code></p>
<p><code>Set objFSO = New FileSystemObject<br />
GetLookIn = BrowseFolder("Where do you want to search?")<br />
If GetLookIn = "" Then<br />
Exit Sub<br />
End If</code></p>
<p><code>Set objFolder = objFSO.GetFolder(GetLookIn)<br />
</code><br />
<code>For Each objFile In objFolder.Files</code></p>
<p><code>myfilename = objFile.Path<br />
ActiveCell.Value = myfilename<br />
ActiveCell.Offset(0, 1).Select<br />
ActiveCell.Value = FileDateTime(myfilename)<br />
ActiveCell.Offset(0, 1).Select<br />
ActiveCell.Value = FileLen(myfilename)<br />
ActiveCell.Offset(1, -2).Select<br />
Next objFile</code></p>
<p><code>ShowSubFolders objFolder<br />
</code><br />
<code>End Sub</code></p>
<p><code>Public Function ShowSubFolders(ByVal Folder As Variant)<br />
Set objFSO = New FileSystemObject<br />
For Each Subfolder In Folder.SubFolders<br />
Set objFolder = objFSO.GetFolder(Subfolder.Path)<br />
Set colFiles = objFolder.Files<br />
For Each objFile In colFiles<br />
myfilename = objFile.Path<br />
ActiveCell.Value = myfilename<br />
ActiveCell.Offset(0, 1).Select<br />
ActiveCell.Value = FileDateTime(myfilename)<br />
ActiveCell.Offset(0, 1).Select<br />
ActiveCell.Value = FileLen(myfilename)<br />
ActiveCell.Offset(1, -2).Select<br />
Next<br />
If Len(Subfolder) Then<br />
ShowSubFolders Subfolder<br />
End If<br />
Next</code></p>
<p><code>End Function</code></p>
<p>Here&#8217;s the code for the GUI</p>
<p><code>'************** Code Start **************<br />
'This code was originally written by Terry Kreft.<br />
'It is not to be altered or distributed,<br />
'except as part of an application.<br />
'You are free to use it in any application,<br />
'provided the copyright notice is left unchanged.<br />
'<br />
'Code courtesy of<br />
'Terry Kreft</code></p>
<p><code>Private Type BROWSEINFO<br />
hOwner As Long<br />
pidlRoot As Long<br />
pszDisplayName As String<br />
lpszTitle As String<br />
ulFlags As Long<br />
lpfn As Long<br />
lParam As Long<br />
iImage As Long<br />
End Type<br />
</code><br />
<code>Private Declare Function SHGetPathFromIDList Lib "shell32.dll" Alias _<br />
"SHGetPathFromIDListA" (ByVal pidl As Long, _<br />
ByVal pszPath As String) As Long<br />
</code><br />
<code>Private Declare Function SHBrowseForFolder Lib "shell32.dll" Alias _<br />
"SHBrowseForFolderA" (lpBrowseInfo As BROWSEINFO) _<br />
As Long</code><br />
<code><br />
Private Const BIF_RETURNONLYFSDIRS = &amp;H1<br />
Public Function BrowseFolder(szDialogTitle As String) As String<br />
Dim X As Long, bi As BROWSEINFO, dwIList As Long<br />
Dim szPath As String, wPos As Integer<br />
</code><br />
<code>With bi<br />
.hOwner = hWndAccessApp<br />
.lpszTitle = szDialogTitle<br />
.ulFlags = BIF_RETURNONLYFSDIRS<br />
End With<br />
</code><br />
<code>dwIList = SHBrowseForFolder(bi)<br />
szPath = Space$(512)<br />
X = SHGetPathFromIDList(ByVal dwIList, ByVal szPath)</code></p>
<p><code>If X Then<br />
wPos = InStr(szPath, Chr(0))<br />
BrowseFolder = Left$(szPath, wPos - 1)<br />
Else<br />
BrowseFolder = vbNullString<br />
End If<br />
End Function<br />
'*********** Code End *****************</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.arcster.com/2010/06/dumping-file-info-into-an-excel-spreadsheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Export Microsoft Outlook Journal entries to Excel</title>
		<link>http://blog.arcster.com/2010/05/export-microsoft-outlook-journal-entries-to-excel/</link>
		<comments>http://blog.arcster.com/2010/05/export-microsoft-outlook-journal-entries-to-excel/#comments</comments>
		<pubDate>Tue, 04 May 2010 19:32:08 +0000</pubDate>
		<dc:creator>arcster</dc:creator>
				<category><![CDATA[Excel]]></category>
		<category><![CDATA[Outlook]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[VBA]]></category>

		<guid isPermaLink="false">http://arcster.com/blog/?p=186</guid>
		<description><![CDATA[If you&#8217;re a Microsoft Outlook Journal user, save this code into a macro to export journal entries from a select time range into Excel. Updated for Excel 2007. In your macro window, under Tools&#62;References, make sure you check the Microsoft &#8230; <a href="http://blog.arcster.com/2010/05/export-microsoft-outlook-journal-entries-to-excel/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re a Microsoft Outlook Journal user, save this code into a macro to export journal entries from a select time range into Excel.</p>
<p>Updated for Excel 2007. In your macro window, under Tools&gt;References, make sure you check the Microsoft Excel 12 Object Library and Microsoft Access 12 Object Library.</p>
<p><code><br />
Sub exportjournal()<br />
''<br />
''Created 4/4/08<br />
''Source: Programming Microsoft Outlook 2000 by Ken Slovak<br />
''Had to add references to Microsoft Excel 11 and Access (for the Nz function)<br />
'' also see http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnaro97ta/html/sampauto.asp<br />
''Works!<br />
Const strNone As String = "No journal items."<br />
Const strTitle As String = "Export"<br />
Dim appOL As Outlook.Application<br />
Dim nmsNS As Outlook.NameSpace<br />
Dim fldFolder As Outlook.MAPIFolder<br />
Dim itmItems As Outlook.Items<br />
Dim itmJournal As Outlook.JournalItem<br />
Dim appExcel As Excel.Application<br />
Dim wbkBook As Excel.Workbook<br />
Dim wrkSheet As Excel.Worksheet<br />
Dim rngRange As Excel.Range<br />
Dim lngCount As Long<br />
Dim intReturn As Integer<br />
Dim intRow As Integer<br />
Dim strRange As String<br />
Dim strWorkBook As String<br />
Dim strUNI As String<br />
Dim begindate As Date<br />
'Set a reference to the default Journal folder<br />
Set appOL = CreateObject("Outlook.Application")<br />
Set nmsNS = appOL.GetNamespace("MAPI")<br />
Set fldFolder = nmsNS.GetDefaultFolder(olFolderJournal)<br />
Set itmItems = fldFolder.Items<br />
lngCount = itmItems.Count<br />
If lngCount = 0 Then<br />
intReturn = MsgBox(strNone, , strTitle)<br />
Exit Sub<br />
End If<br />
'Get date from user<br />
begindate = InputBox("Enter Begin Date")<br />
EndDate = InputBox("Enter End Date")<br />
strWorkBook = "C:\foldername\JournalExport.xls"<br />
'Initialize Excel items<br />
Set appExcel = CreateObject("Excel.Application")<br />
appExcel.Workbooks.Open (strWorkBook)<br />
'Activate Sheet 1<br />
Set wrkSheet = appExcel.ActiveWorkbook.Sheets(1)<br />
wrkSheet.Activate<br />
appExcel.Visible = True<br />
'Set Sheet column widths<br />
wrkSheet.Columns("A").ColumnWidth = 20<br />
wrkSheet.Columns("B").ColumnWidth = 20<br />
wrkSheet.Columns("C").ColumnWidth = 16<br />
wrkSheet.Columns("D").ColumnWidth = 20<br />
wrkSheet.Columns("E").ColumnWidth = 50<br />
'The example in the book<br />
'has a bunch of formatting code that I am ignoring<br />
'Start adding data at Column A, Row 1<br />
intRow = 1<br />
strUNI = "A"<br />
For Each itmJournal In itmItems<br />
With itmJournal<br />
'adjust date as needed<br />
'If itmJournal.LastModificationTime &gt; begindate And itmJournal.LastModificationTime &lt; EndDate Then         If itmJournal.Start &gt; begindate And itmJournal.Start &lt; EndDate Then<br />
'Subject<br />
strRange = strUNI &amp; CStr(intRow)<br />
Set rngRange = wrkSheet.Range(strRange)<br />
rngRange.Value = nz(.Subject)<br />
'start time<br />
strUNI = Chr(Asc(strUNI) + 1)<br />
strRange = strUNI &amp; CStr(intRow)<br />
Set rngRange = wrkSheet.Range(strRange)<br />
rngRange.Value = nz(.Start)<br />
'Duration<br />
strUNI = Chr(Asc(strUNI) + 1)<br />
strRange = strUNI &amp; CStr(intRow)<br />
Set rngRange = wrkSheet.Range(strRange)<br />
rngRange.Value = nz(.Duration)<br />
'Categories<br />
strUNI = Chr(Asc(strUNI) + 1)<br />
strRange = strUNI &amp; CStr(intRow)<br />
Set rngRange = wrkSheet.Range(strRange)<br />
rngRange.Value = nz(.Categories)<br />
'Notes = body(?)<br />
strUNI = Chr(Asc(strUNI) + 1)<br />
strRange = strUNI &amp; CStr(intRow)<br />
Set rngRange = wrkSheet.Range(strRange)<br />
rngRange.Value = nz(.Body)<br />
'Back to column A, next row<br />
strUNI = "A"<br />
intRow = intRow + 1<br />
End If<br />
End With<br />
Next itmJournal<br />
Exit Sub<br />
ExportJournal_Error:<br />
MsgBox "Error #" &amp; Err.Number &amp; Err.Description<br />
End Sub<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.arcster.com/2010/05/export-microsoft-outlook-journal-entries-to-excel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cool Excel formula for replacing line breaks</title>
		<link>http://blog.arcster.com/2010/03/cool-excel-formula-for-replacing-line-breaks/</link>
		<comments>http://blog.arcster.com/2010/03/cool-excel-formula-for-replacing-line-breaks/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 22:11:39 +0000</pubDate>
		<dc:creator>arcster</dc:creator>
				<category><![CDATA[Excel]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://arcster.com/blog/?p=140</guid>
		<description><![CDATA[If you copy and paste from another application into Excel, chances are you&#8217;ll come across some boxes that create unsightly line breaks in your cells. Use this formula to make those line breaks disappear: =SUBSTITUTE(SUBSTITUTE([celladdress],CHAR(13)," "),CHAR(10),"") where [celladdress] is the &#8230; <a href="http://blog.arcster.com/2010/03/cool-excel-formula-for-replacing-line-breaks/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you copy and paste from another application into Excel, chances are you&#8217;ll come across some boxes that create unsightly line breaks in your cells.</p>
<p>Use this formula to make those line breaks disappear:</p>
<pre>=SUBSTITUTE(SUBSTITUTE([celladdress],CHAR(13)," "),CHAR(10),"")
</pre>
<p>where [celladdress] is the cell you are fixing</p>
<p>Warning: you will have the Who song <em>Substitute </em>stuck in your head after using this formula.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.arcster.com/2010/03/cool-excel-formula-for-replacing-line-breaks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

