Thursday, November 7, 2013

Excel - Grouping Dates by Month in a Pivot Table

For this post I am referencing the work creating by the talented minds at Chandoo.org, a great resource for advancing your knowledge of Excel.  Here's the direct link to their pivot table post.


I ran into a problem when creating a pivot table yesterday.  Here's my raw data, a series of daily bank payments that I wanted to group to show what months the account had made payments in.



Creating the pivot is pretty easy, but the result is that for each account the payments show up by day instead of summed up by month.



Here's the trick that the guys at Chandoo.org showed me.  Right click on a date cell; the pull-down menu will show a category called "Group...". Click Group and you can select month, year, etc.




The result is a nice pivot table with your numbers summed up by month. 


One caveat, it seems when you group by month it only looks at the month part of a date field, so if you have dates spanning multiple years they will get summed up to the specific month.  So you have to select group by month and year, this will do the trick!

Wednesday, August 14, 2013

PDF - Exporting data from the pdf to a spreadsheet

I've received a bunch of pdf files and I want to get the data out of the PDF form and into a spreadsheet.  

Fortunately the vendor that created the pdf files is using a pdf form, so the fields are not just scanned text, they're actual data elements.

The Adobe Acrobat XI website has an excellent description of how to import and export data from pdf files, here's the link that I got my information on:

Source for how to move data from PDF
Here's the excerpt I used, you have to have Acrobat Pro to do this.

Merge exported data files to a spreadsheet

If you want to compile data from forms that are not already in a data set, use the following process.
  1. Choose Tools > Forms > More Form Options > Manage Form Data > Merge Data Files Into Spreadsheet.
  2. In the Export Data From Multiple Forms dialog box, clickAdd Files.
  3. In the Select file Containing Form Data dialog box, select a file format option in File Of Type option (Acrobat Form Data Files or All Files). Then locate the form files that you want to merge into the spreadsheet, select them, and click Open.
  4. Repeat the previous step to add form data files that are in other locations, as needed.
  5. Click Export. Then select a folder and filename for the spreadsheet, and click Save.
  6. In the Export Progress dialog box, click either View File Now to open the spreadsheet file or Close Dialog to return to Acrobat.
How to get the data out of pdf to a spreadsheet

Wednesday, May 8, 2013

Excel - Shade Alternating Rows

Making alternate rows go from white to shaded and back to white is a pretty quick job once you know what to do.

1.  Select the cells you want to add alternating shade on
2.  On the Home Ribbon click the "Conditional Formatting" button
3.  Select "New Rule"
4.  Among the rule options select "Use a formula to determine which cells to format"
5.  Type in the formula "=Mod(Row(),2)=0"
6.  Last of all, cluck the format button and select a color you want to use for the alternating cell shading.



Option 2, you can also use the "Format as Table" button next to the "Conditional Formatting" button on the Home ribbon.  This has all sorts of other built in functionality that goes way beyond just alternating shading so I don't use it that much.

Microsoft Instructions on how to create alternate cell shading...



Tuesday, April 23, 2013

Word - Comparing Documents for Changes - Meet the "Compare" button

Am I the last person on the planet to know this function was pre-built into Microsoft Word 2010?

I've been using a free application called Winmerge to compare documents for changes between one version and another.  You can read more about it at http://www.codejacked.com/comparing-two-versions-of-a-word-document/.  It works awesome for comparing two code files side by side and seeing the changes between them.  Problem is, I can't figure out how to get it to work with Word 2010 .docx files, it gives me a bunch of gobbledy gook instead of words.

Enter the "Compare" button in Word 2010.

It's under the "Review" tab in the top menu of word.  Click it and you'll be prompted to select two Word documents.  It then lists all the changes between these two versions and shows the two docs as well as you scroll through the changes.

I'm using this to review a contract before signing it, just to make sure there haven't been any changes slipped in since I last reviewed it.

Now, I just need to figure out how to compare .pdf files...

Monday, March 25, 2013

Excel - Convert Text to a Number

Excel just gets so mixed up with numbers and text, and it sucks to deal with.  For example, if you want to use Match() or Vlookup() and in one sheet you have the field as text and the other you have it as a number, the lookup will fail!  Why can't one of these lookups work like control-F (Find), it will find a match wether it's text, number, or any other format!

Anyways, if you have a column of numbers stored as text you'll see this little guy:


That green carrot in the corner tells you that this is a number stored as text.

To convert it back to a number you can use:

VALUE( )

That way you can keep it as text in one column and a number format in another.

Here are the other methods that Microsoft lists off,  Method 1 and 2 are totally dumb.  Probably the easiest is to just select all the cells, hold the shift key, click that green carrot and select convert text to number (which they don't even mention!).

To convert text to numbers in a worksheet, use any of the following methods. 

NOTE: Each of these methods assumes you have already changed any cell number formatting in the cells to General. To do this, follow these steps:
  1. On the Format menu, click Cells.
  2. On the Number tab, under Category, click General, and then click OK.

Method 1: Retype the Values in the Cells

On the Format menu, click Cells, and click the Number tab to change the number format of the cells. Then, retype the numbers.

Method 2: Select "Edit Directly in Cell"

To use this method, follow these steps:
  1. On the Tools menu, click Options (in Windows), or click Preferences on the Edit menu (on the Mac).
  2. On the Edit tab, verify that the Edit directly in cell check box is selected. Click OK.
  3. Double-click the cell you want to format, and then press ENTER.

Method 3: Use Paste Special with Multiply

To use this method, follow these steps:
  1. In any blank cell, enter the value 1.
  2. Select the cell in which you typed 1 and click Copy on the Edit menu.
  3. Select the cells with the values that you want to convert to numbers.
  4. On the Edit menu, click Paste Special.
  5. Under Operation, click Multiply. Under Paste, click Values, and then click OK.

Method 4: Remove Hidden Characters and Spaces

This method works best if the data is arranged in a single column or row. This technique uses the TRIM function and the CLEAN function to remove extra spaces and nonprinting characters that may be imported with the file. The following example assumes that the data is in column A and starts in row 1 ($A$1). To use this example, follow these steps:
  1. Insert a column to the right of column A by selecting column B and clicking Columns on the Insert menu.
  2. In the first cell of the inserted column (B1), type the following:
  3. In column B, select all the cells to the right of the cells that contain data in column A.
  4. On the Edit menu, point to Fill, and then click Down.

    The new column contains the values of the text in column A.
  5. With the same range selected, click Copy on the Edit menu.
  6. Select cell A1, and click Paste Special on the Edit menu. Under Paste, click Values, and click OK to paste the converted values back on top of column A.
  7. Delete column B by selecting the column and clicking Delete on the Edit menu.
The text that was in column A is in a number format.

Method 5: Use a Visual Basic for Applications Procedure

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. Create a Visual Basic for Applications macro to reenter the numbers in the selected cell or range of cells. To do this, follow these steps:
  1. Select the cells that exhibit the behavior.
  2. If you have not already done so, click Cells on the Format menu and click the Number tab to change the number format of the cells.
  3. On the Tools menu, point to Macro, and then click Visual Basic Editor.
  4. On the Insert menu, click Module.
  5. Type the following macro code in the new module:
  6. On the File menu, click Close and Return to Microsoft Excel.
  7. Reselect the affected cells if they are not already selected.
  8. On the Tools menu, point to Macro, and then click Macros. In the Macro name list, click Enter_Values. Click Run.

Method 6: Use Text to Columns

This method works best if the data is arranged in a single column. The following example assumes that the data is in column A and starts in row 1 ($A$1). To use this example, follow these steps:
  1. Select one column of cells that contain the text.
  2. On the Data menu, click Text to Columns.
  3. Under Original data type, click Delimited, and click Next.
  4. Under Delimiters, click to select the Tab check box, and click Next.
  5. Under Column data format, click General.
  6. Click Advanced and make any appropriate settings for the Decimal separator and Thousands separator. Click OK.
  7. Click Finish.
The text is converted to numbers.


Monday, March 4, 2013

Excel - Create a Dropdown List in a Cell



I've just copied it here for ease of use.


  1. To create a list of valid entries for the drop-down list, type the entries in a single column or row without blank cells. For example:
A
1Sales
2Finance
3R&D
4IT
 NOTE    You may want to sort the data in the order that you want it to appear in the drop-down list.


2. Select the cell where you want the drop-down list.

  1. On the Data tab, in the Data Tools group, click Data Validation.
Data Tools group on the Data tab






4. In the Data Validation dialog box, click the Settings tab.
  1. In the Allow box, click List.
  2. Now select the cells that hold your list.
  3. Make sure that the In-cell dropdown check box is selected.
  1. To specify whether the cell can be left blank, select or clear the Ignore blank check box.

Tuesday, February 26, 2013

Excel: Calculate the difference between two dates

Here are some difference date calculations


A2 = "12/3/2012"
A3 = "2/26/2013"


Days between two dates
=A3-A2 = 85

Weekdays between two dates
=Networkdays(A2, A3) = 62

Months between two dates
You could just do Month(A3)-Month(A2) but if you the dates cross different years the result would be incorrect.  Here's the best formula for calculating the # of months between two dates:
= (Year(A3)-Year(A2))*12+Month(A3)-Month(A2) = 2

Years between two dates
=Year(A3)-Year(A2) = 1
This can give you a faulty result.  It hasn't really been 1 year between A3 and A2, but since they are in different years the calculation says 1.


For the same help from Microsoft go to:
http://office.microsoft.com/en-us/excel-help/calculate-the-difference-between-two-dates-HP003056111.aspx

Dates are actually given a sequential number, so A3 = "2/26/2013" is really equal to 41331.  If you see your dates represented by with a number like 41331 you can either change the cell format to "Short Date"(Right click and select "Date" in the format).

Other Date Functions in Excel
DateValue(textvalue)
Let's say you're dealing with an excel file that has a bunch of text that should be a date.  You can use =Datevalue(A2) to convert the text field into a property date field.

Date(Year,Month,Day)
You can also use Date() to build a date field from multiple cells.
Date(Year, Month, Day) is the format.
So if you had A1=2012, B1= 1, and C1 = 1, Date(A1,B1,C1) = "1/1/2012"

Today()
Returns Today's date and will update any time the spreadsheet is opened.

Now()
Returns today's date and timestamp.

Timestamp that doesn't Change
IF you'd like to add the current date in a cell and have it remain fixed just click into a cell, hold the Ctrl key and press the semicolon (;) key.  To insert the crrent time (without a date), press Ctrl-Shift-Semicolon.
This is useful if you want to document your work.  You might want to keep track of when you added new data to your worksheet.


Friday, February 8, 2013

Visio - Creating process maps with swim lanes

Visio is a terrific tool for creating process maps.


I particularly like the cross-functional flowchart which allows you to organize tasks by who is performing them in a process map.

Open Visio and go to:File-> New and select Template "Cross-Functional Flowchart (US units)"




A pop-up will come up asking if you want horizontal swim lanes or vertical.  I prefer horizontal.
This produces a 2 or 3 lane chart:


One thing to be aware of is that there is a new section added to the top ribbon bar in Visio called "Cross-Functional Flowchart" that provides specific functionality for this chart type.




This gives you the ability to add additional swimlanes and to divide up your swimlanes with seperators.  

Seperators allow you to break up the swimlanes according to the phase of your flowchart, it makes it easier to group activities according to a timeframe.  As a result, the cross-functional flowchart now shows which organizations have responsibilities at which point on a project.   





If you're new to visio, take the time to learn what each shape represents.  Start/End, Process, Document, Decision, etc.. Use the first link below to learn the shapes.



Links

Writing a Pitch Book

3 Important parts of a good pitch

1.  Argument for the asset class you're buying / need for your business
2.  Argument for timing (why now?  What's unique?)
3.  Why are you uniquely qualified?

Every slide in your pitch should address one of these questions.  If it doesn't, ask yourself why it's there at all.

You can look at it like a sports analogy:
1.  What is the game?
2.  What inning is it?
3.  Who is on my team?
4.  Who is the best team?
5.  What is the prize?