Monthly Archives: September 2008

Applying case formatting in Excel

A question from Askville:

Excel question – is there any way to apply a function in place?

A couple of examples – I have a cell that is in lower case and I want it to be upper case. Can I apply that function to the cell? or do I have to create another column, apply the function there, copy and paste special:values to get the cell in the format I want? Or taking a cell with a name in it that isn’t “proper” – can I do that against the existing cell without having to go through all those other convulsions?

You can, but you’ll need to write a macro to do it. Something along these lines:

Sub ApplyUpper()
  For Each Cell In Selection
    Cell.Value = UCase(Cell.Value)
  Next Cell
End Sub

Sub ApplyProper()
  For Each Cell In Selection
    Cell.Value = StrConv(Cell.Value, vbProperCase)
  Next Cell
End Sub

On real estate and interest rates

A question from Askville:

What’s the impact of the Fed’s $500B bailout on real estate and interest rate?

Will my mortgage interest rate drop dramatically in the next few months? (Planning to sell and trade up a bigger home for investment….)

Real estate prices, in spite of the recent drop, are still way out of line with both incomes and rents. As to mortgage interest rate, here’s a long-term picture for you to ponder (this is conventional mortgage rate as reported by Federal Reserve):

Mortgage Rates

As you can see, the current interest rates are still close to historic lows, so I wouldn’t expect a dramatic drop any time soon…

Stephen Dubner wonders about reading news

Stephen Dubner writes:

Admirim Luboteni, living in Kuala Lumpur, Malaysia, writes with a simple but hard question:

Which general news/business sites should one read daily to keep himself well-informed?

I will be interested to see how many people suggest aggregators like Newser or a new one I just heard about, NewsCred.

Also, I would add to Admirim’s question:

Which blogs?

The simple answer is, none.

News, by and large, is noise. It does nothing to keep you informed, it just gives you a convenient delusion of being informed. When you read news, you have to make two leaps of faith simultaneously, (1) that what the reporter says is true, and (2) that what the reporter says is important and/or relevant. Needless to say, there is never any assurance of either. People constantly forget this and construct a parallel mental universe, only superficially resembling the actual one, from news clippings. Suffice it to say that to this day, many people that consider themselves educated think that Word War I was caused by assassination of Franz Ferdinand, rather than by the gold standard…

Additionally, even if all news were true and relevant, you would still need the ability to put the news items into a proper context. And that ability simply cannot be gained by reading news; it requires a combination of raw intelligence and training.  But you can’t be trained in everything; there’s only so much you can know well.  Hence, a more complicated answer: to stay informed about the developments in your area of expertise, you need news sources that you yourself (or someone whose opinion you respect) deemed to be of sufficient quality in that area.  To give an extreme example, publications that cover horse racing well are unlikely to have an equally good coverage of developments in particle physics and vice versa.

As to blogs, they are a genre of literature. They are no more intended to keep you informed than romantic novels or Greek tragedy. Most blog writers out there are commentators, not reporters…

Including free-form PHP into WordPress

Update: include_HTML now has its own page.  

Every once in a while, there is a need to include free-form PHP (or HTML, or JavaScript) into a WordPress post or page (a recent post on WordPress support forums raised that problem yet again). This need can be addressed with a very simple plugin. The installation is, once again, WordPress standard; download and unzip the file, create an include-html directory on your WordPress server under wp-content/plugins, put include-html.php into it, and activate the plugin using WordPress’ administrative interface.

Usage is equally simple: create a file containing any combination of PHP, HTML, and/or JavaScript you want (for example, let’s say the file is accessible as and include it into your post or page as follows:


To see this plugin at work, you can look here; the “HTML file with relevant code” is included in the body of the post.