Here is a new year gift to all our readers – free 2012 Excel Calendar Template.
This calender has,
- One page full calendar with notes, in 4 different color schemes
- 1 Mini calendar
- Monthly calendar (prints to 12 pages)
- Works for any year, just change year in Full tab.

Download 2012 Calendar – Excel File
Click here to download the file. For Excel 2003 compatible version, click here.
We wish you an awesome New Year 2012.
How does this Calendar work?
This is the same file as 2011 calendar with the year changed. So,
- The cell D3 in worksheet Full has the year of calendar. I named this cell as year.
- All the formulas for the calendar are written in the worksheet mini.

- For this calendar, I took inspiration from Daniel’s Live Calendar example (Recommended reading for formula enthusiasts).
- The first step to create a calendar is to generate a sequence of numbers 1 thru 42 (because calendar grid has 42 cells – 7 days per week x 6 weeks max, per month). I used a combination of INDIRECT, OFFSET and COLUMN to get this. The formula is
=COLUMN(OFFSET(INDIRECT("$A$1"),0,0,1,42))-1. I mapped this formula todaysAndWksnamed range. - Next step is to find the first date of each month using a simple date formula like
=date(year,month,1). This formula is mapped to named range –DateOfFirst - For given month, the calendar is nothing but
=daysAndWks + DateOfFirst - WEEKDAY(DateOfFirst,2). This formula is mapped to named range –calendar.

- Once the mini calendar is ready, I just created 12 named ranges m1_, m2_,…, m12_ corresponding to each of the 12 months.
- Then, I used the same in individual calendar worksheets along with INDEX formulas to fetch the dates.
- Finally, I formatted the calendars nicely. Design of this calendar is similar to that of 2010 calendar & 2009 calendar templates.
Go ahead and enjoy the download. The file is unlocked. So poke around the formulas and named ranges. Learn some Excel.
More Downloads: Download Free Excel Templates
Techniques used: INDEX | OFFSET| INDIRECT | Array Formulas | Using Date & Time in Excel

















6 Responses to “Make VBA String Comparisons Case In-sensitive [Quick Tip]”
Another way to test if Target.Value equal a string constant without regard to letter casing is to use the StrCmp function...
If StrComp("yes", Target.Value, vbTextCompare) = 0 Then
' Do something
End If
That's a cool way to compare. i just converted my values to strings and used the above code to compare. worked nicely
Thanks!
In case that option just needs to be used for a single comparison, you could use
If InStr(1, "yes", Target.Value, vbTextCompare) Then
'do something
End If
as well.
Nice tip, thanks! I never even thought to think there might be an easier way.
Regarding Chronology of VB in general, the Option Compare pragma appears at the very beginning of VB, way before classes and objects arrive (with VB6 - around 2000).
Today StrComp() and InStr() function offers a more local way to compare, fully object, thus more consistent with object programming (even if VB is still interpreted).
My only question here is : "what if you want to binary compare locally with re-entering functions or concurrency (with events) ?". This will lead to a real nightmare and probably a big nasty mess to debug.
By the way, congrats for you Millions/month visits 🙂
This is nice article.
I used these examples to help my understanding. Even Instr is similar to Find but it can be case sensitive and also case insensitive.
Hope the examples below help.
Public Sub CaseSensitive2()
If InStr(1, "Look in this string", "look", vbBinaryCompare) = 0 Then
MsgBox "woops, no match"
Else
MsgBox "at least one match"
End If
End Sub
Public Sub CaseSensitive()
If InStr("Look in this string", "look") = 0 Then
MsgBox "woops, no match"
Else
MsgBox "at least one match"
End If
End Sub
Public Sub NotCaseSensitive()
'doing alot of case insensitive searching and whatnot, you can put Option Compare Text
If InStr(1, "Look in this string", "look", vbTextCompare) = 0 Then
MsgBox "woops, no match"
Else
MsgBox "at least one match"
End If
End Sub