Thursday, January 28, 2010

Dead Rapping Economists


I don't know why this hasn't already taken over the Internet .

Fear the Boom and Bust: Keynes vs. Hayek in a rap video

HT: Caleb Sjogren

From what I've read, the portrayal of Keynes as a playboy is historically accurate.

Tuesday, January 26, 2010

Budget Planning with Excel: Macros

If you've never created a macro in Microsoft Office, you're missing out. You probably have some repetitive task that you wish you could automate. Well, it probably is possible to automate it (though it might take writing some computer code).

There is a way to create macros without dealing with code: you can tell Excel (or Word, or other Office programs) to record a macro. I won't explain this; if you haven't done it, just search for "record macro Excel" and you'll find the info you need.

To deal with the code that underlies macros, you use the Visual Basic Editor. Open this program by pressing Alt + F11 from Excel. It should look something like this:

Though you won't have the module Budget2010 and its code. That's what I'm going to give you.

I can't take time to explain everything about this editor or the language (Visual Basic) that it uses. There are millions of web pages out there that explain these, as well as a decent help file in the Visual Basic Editor itself.

For now, just try adding a module (Insert > Module) and giving it a meaningful name (instead of the default Module1). Then copy the code below and paste it into the module's code window:

Sub AddAnotherLinetoDate()
'Shortcut=Ctrl+D
'Adds another row below the current one, so you can record another transaction for that day.
Dim s As Worksheet
Dim r, c As Long
Dim d As String

Set s = ActiveSheet
r = ActiveCell.Row
c = ActiveCell.Column
d = s.Cells(r, 1).Text

Rows(r + 1).Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
'Give the new row the same date as the original row.
s.Cells(r + 1, 1).Value = d
'Gray out the date in the new row
s.Range("A" & r + 1 & ":A" & r + 1).Font.Color = RGB(169, 169, 169)
s.Cells(r + 1, c).Select
End Sub

The comments (the lines that start with ') explain what this subroutine does: it adds a new row to the selected date. To try the macro out, select a cell in Excel, then go back to the Visual Basic Editor, put your cursor anywhere inside the code, and press F5.

Of course, you don't want to have to open the Visual Basic Editor every time you run a macro, so you can give macros keyboard and button shortcuts. I'll explain how to do that in my next post.

In the meantime, you'll want to save your Excel spreadsheet, which now has this code stored in it as well. In Office 2007, you have to save the spreadsheet with the .xslm extension to enable macros.

Thursday, January 21, 2010

Dear Stonybrook Center,


How did I get on your mailing list for people dealing with opiate addiction? I figure a good chunk of my junk mail comes from the Evangelical Theological Society selling their mailing list, but I don't think I should blame them. Unless that imminent Evangelical collapse I've been hearing about has finally happened . . .

For the record, I support counseling and believe that it shouldn't bear a stigma. Helping people recover from addiction is a difficult and important task that I respect. I'm sure the folks at Stonybrook Center do a fine job.

Unless they're some sort of scam, which may be why they don't come up on Google and their phone number seems to belong to a moving company.

Tuesday, January 19, 2010

Mesmerizing Texts

Gorgeous ASCII animation.

I love this stuff.

HT: Alan Jacobs

Budget Planning with Excel: The Columns

What columns do you need in your Excel spreadsheet to track your finances? Well, the way we do it, you need one column for each

1. Source of income
2. Account that holds money (assets)
3. Account that you owe money (debts or liabilities)
4. Category of regular expenses

The first three should be easy to identify. I have one job, my wife has one job, so there are two income columns. We have a checking account, a savings account, and each of us carries cash, so there are four asset columns. We have a few credit cards and some student loans (our debt columns).

Deciding how many of the fourth kind of column (budget categories) you need takes some trial and error. We currently have about 20 budgeted columns. Just to give you some ideas, here they are:

Groceries
Toiletries
Household supplies/Laundry
Clothes
Missions
Life insurance
Health care
Car insurance
Gasoline
Car maintenance
Rent
Renters' insurance
Electricity
Water/Gas/Garbage [all three of these appear on one bill]
Landline
My cell
My wife's cell
Dates
Social events
Travel

And the big catch-all:

Other

We've set a certain amount of money that goes into each of these columns at the beginning of the month. Any leftover money should carry over to the next month, but the reality is that sometimes you have to steal from one column to make up unforeseen shortfall in another. This is where trial and error comes in. If one column is always short and another is always over, maybe you can change the allocations. Or maybe (if the Groceries column is always short, for example) you need to rein in your spending.

Finally, I should mention one other kind of column that is largely optional. I have columns for the deductions that come out of our paychecks before they're deposited: taxes, retirement, flexible spending accounts. I included them this year for the sake of completeness, but they're out of the picture for the basic monthly budget. They mostly don't interact with other accounts and budget categories, and my pay stub already shows me what the running total is.

In the next post, we'll start talking about the macros and forms I use to save time in entering income and expenses.

Saturday, January 16, 2010

Works of Genius

Last night I finished The Omnivore's Dilemma by Michael Pollan. (Whom I loved at first read.) This book was a delight from beginning to end. I was so often looking up from it to tell Mrs. Chaka what I had just read that I might as well have read the whole thing aloud to her.

After finishing it, I realized that I've read quite a few spectacular books recently. The following are my recent reads that I do not hesitate to call Works of Genius (the star means it was a re-read):

The Omnivore's Dilemma by Michael Pollan
Planet Narnia by Michael Ward
*Jonathan Strange & Mr Norrell by Susanna Clarke
Jesus of Nazareth by Joseph Ratzinger (Pope Benedict XVI)
*The Name of the Rose by Umberto Eco
*The Brothers Karamazov by Fyodor Dostoyevsky

Recently read books that I'd place just shy of genius include:

The Great Divorce by C. S. Lewis
Word Myths by David Wilton
The Natural History of Unicorns by Chris Lavers
Becket by Alfred, Lord Tennyson

Wednesday, January 13, 2010

Budget Planning with Excel: Cell Format

Tip Number 2: Make ordinary numbers appear as dates and currency.

I use a worksheet for each month of the year. The lefthand column of the sheet gives the date. You don't have to type 1-Jan, 2-Jan, 3-Jan, etc for the whole month. Excel can interpret a positive integer as a date. Here's how it works.

1 = January 1, 1900
2 = January 2, 1900
. . .
40,179 = January 1, 2010

So try this: Put "40179" in cell A5. Right-click A5 and choose "Format cells." Select "Date" from the Category box and choose the Type on the right. You'll see a preview in the Sample window.

Now your 40179 is transformed into a date.

To populate the rest of the dates for the month, create a formula in A6: "=A5+1". After you hit Enter, A6 should show 1/2/2010. You can copy A6, select the next 30 rows or so, and select Paste. You now have a month of dates.

You can redo this for every month (February 1, 2010 = 40,210), or I suppose you could do the whole year in one sheet.

The format for most cells in the sheet (everything east of column A and south of row 4) will be Currency. I prefer the format that shows negative numbers in red with parentheses. When the cells are set up like this, Excel will automatically interpret an entry like "4.1" as $4.10 and -38.5 as ($38.50). High visual contrast and a minimum number of keystrokes. That's what I like.

Budget Planning with Excel: Freezing Panes

Here's Tip Number 1: Learn how to freeze panes properly. This is a feature of Excel that never works the way I think it should, but it is possible to freeze the leftmost column(s) and topmost row(s) so that they're always visible when you scroll elsewhere in the document.

In Excel 2007, the Freeze Panes command is on the View tab. Pre-2007, it's under Window.

The trick is to select the cell that will be in the upper left-hand corner of the lower right-hand quadrant before choosing "Freeze Panes." Got that?

If you select the cell highlighted as "This one!" in the picture above, you'll freeze the top two rows and the leftmost column so they're always visible.

At the risk of belaboring the point, it may help to think of this command as cutting the sheet into four quadrants (the "panes"). Excel will make a cut along the top of the selected cell and along its left side.

If you mess up, there doesn't seem to be a way to adjust where the "cuts" lie. You just have to unfreeze the panes and try again.

(HT: Tech Xpress)

Budget Planning with Excel

I spent New Year's Day gearing up to track the family finances. Since the beginning of our marriage, Mrs. Chaka and I have used an Excel spreadsheet for this purpose. I was planning to migrate to something more fully featured, such as GNUCash, but after playing around with that program for a bit, I felt that a couple modifications to Excel would serve us better. This is because I'm lazy and didn't want to learn a new system.

Now, credit where credit is due: Mrs. Chaka started our budget, using a system she learned from her mentor Jason Falck. Any blunders I've introduced should be laid at my door, of course, not theirs.

You may have heard of Dave Ramsey's envelope system: You put the budgeted cash in an envelope and when the money for that category is gone, it's gone. Our system is like that, except we use Excel columns instead of envelopes. There's a Gas column, a Groceries column, a Rent column, etc. When we make a payment from our credit card or bank account, we deduct the money from two columns--the account and the budget category. E.g.,


On the 5th of January there, the $24.86 we spent at Valli Produce (The Platonic Ideal of a Grocery Store) was deducted from our credit card (USAA) and from the Groceries column.

One of the reasons Mrs. Chaka and I both dreaded working on the budget in the past was the time it took to enter every expenditure twice--sometimes more than twice, since we often needed to use comments to make notes about the transaction.

My goal on New Year's Day was to hack Excel to reduce the number of times I have to enter the same information. In the next few posts, I'll share my results.