Book Template Constants

I said I should do it. So I did it.

I created four workbook-level defined names in a blank workbook. Then I saved that workbook as Book.xlt in C:\Program Files (x86)\Microsoft Office 2010\Office14\XLSTART\. Now every new workbook will have those four named constants for use in formulas.

I put the chances that I will remember that they’re there/use them at about 20%.

4 thoughts on “Book Template Constants

  1. I like the idea and there must be more applications for this. But, why these? Isn’t it just easier to type ” ” than xlSpace?

  2. ” ” is easier to type, but not easier to read later, is my thought here. And ‘space’ is the least egregious of them all. The worst, for me, is single quote.

    =IF(A1="'",TRUE,FALSE) vs.  =IF(A1=xlSINGLE,TRUE,FALSE)

    That’s easier to read on this blog than it is in the formula bar. The comma is a bad one when it’s right next to an argument-breaking comma.

    =MATCH(",",tblPunctuation,FALSE) vs.  =MATCH(xlCOMMA,tblPunctuation,False)

    So far I’ve used this zero times. :)

  3. This reminds me of one of my first blog posts. It was called “Goofy Code” and the line of code that prompted it looked like:

    SplitCell = Split(Replace(Replace(cell.Value2, ")", ""), "(", ""), ",")


Posting code? Use <pre> tags for VBA and <code> tags for inline.

Leave a Reply

Your email address will not be published.