I use google suggest to get new post ideas, I start out by typing “what is”, “who is”, “how to”, “when is”, “where is”, “excel” and see all the suggestions Google comes up with. If I see something interesting I would mark the search topic and use it for posting here. And for the last few days I have been seeing that when I try “who is”, the search query “who is (Barack) Obama?” is popping up. Either he is really unknown (unlikely) or provoking curiosity in many people.
Ok, time for sharing another set of juicy excel posts around the web:
Do Gapminder like Motion charts in excel, the kind you saw in the Olympic medals visualization in Excel. Jon @ PTS Blog has put together a generic approach for creating motion charts in excel. Very simple and useful. Of course, if you want even simpler method, you can always use motioncharts widget in google docs spreadsheet app.
Formatting dates in pivot chart, of course if you try the usual route of “format axis > number format” and set it to show the date nov-10 instead of 11/10/2008, it wouldnt work. You have to use the technique highlighted at the contextures blog.
Excel UDFs for advanced linear interpolation, conversion of co-ordinates from rectangular to polar If you use excel to do graph related analysis, to build 2d / 3d models then this set of downloadable UDFs by Newton Bach’s blog would be very useful to you.
How to create a perpetual yearly calendar in Excel Do you have a nagging question around “what’s date of the eighth Thursday of 1922” teases the Microsoft Excel Blog, of course, they answer it too, with a downloadable perpetual yearly calendar in Excel for those of you who need to do lots of date analysis.
Finally, if you are not the kind who would read excel articles on a Tuesday, here is a short TED talk by Prof. Hans Rosling on Debunking third-world myths with the best stats you’ve ever seen. It is extremely insightful and entertaining. So enjoy the next 20 minutes.
Also see:

















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