<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Michael Jay Lissner</title><link href="https://michaeljaylissner.com/" rel="alternate"></link><link href="https://michaeljaylissner.com/feeds/tag/excel" rel="self"></link><id>https://michaeljaylissner.com/</id><updated>2008-05-22T12:16:59-07:00</updated><entry><title>Create a List of Formulas from Excel Files</title><link href="https://michaeljaylissner.com/posts/2008/05/22/create-a-list-of-formulas-from-excel-files/" rel="alternate"></link><updated>2008-05-22T12:16:59-07:00</updated><author><name>Mike Lissner</name></author><id>tag:michaeljaylissner.com,2008-05-22:posts/2008/05/22/create-a-list-of-formulas-from-excel-files/</id><summary type="html">&lt;p&gt;I have begun training a replacement at work, and I need to teach him all of 
the excel formulas that we use in our department documents. I started making a 
list of all the formulas, but my mind quickly went blank, and I decided I 
needed a way to automate&amp;nbsp;it. &lt;/p&gt;
&lt;p&gt;Here&amp;#8217;s the technique I figured out. Open each of the files that you believe 
has useful formulas in it, and go to File &amp;gt; Save as&amp;#8230; Save each document into 
an empty directory as xml spreadsheets (.xml). If you open one of these 
documents in a text editor, you are likely to see a line something like the&amp;nbsp;following: &lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="nt"&gt;&amp;lt;Cell&lt;/span&gt; &lt;span class="na"&gt;ss:Formula=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;=SUM(C:C[1])&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;Data&lt;/span&gt; &lt;span class="na"&gt;ss:Type=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Number&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;0&lt;span class="nt"&gt;&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The key is that each row in your new xml documents that contains a formula 
will have the formula keyword, so to isolate these, run the following on a 
Unix computer in the directory where you saved all the xml&amp;nbsp;documents.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;grep &lt;span class="s1"&gt;&amp;#39;Formula=&amp;#39;&lt;/span&gt; *.xml | sort | uniq &amp;gt; uniqLinesWithFormulas.txt
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;That will create a file called uniqLinesWithFormulas.txt that will contain 
each line from all of your &lt;code&gt;.xml&lt;/code&gt; files that contains a formula. From there, 
you can skim them visually for useful formulas, or put the file into Excel 
again and play with it there. This was as far as I needed to go in my 
analysis. Once I had this done, it was pretty easy to see the 30 or so 
formulas I regularly&amp;nbsp;use.&lt;/p&gt;</summary><category term="microsoft"></category><category term="excel"></category></entry></feed>