Posts Tagged ‘Tips and Tricks’

Why FIND when you can SEARCH

March 15th, 2010

Vinicius writes to ask:

"Dear Mr. Pig. I would like to know what the difference is between Excel's FIND and SEARCH. Which one should I use?"

I love the respect Vinicius shows by calling me Mr. Pig. Anyway, here is your answer Mr. Vinicius:

 

There are two differences between Excel's SEARCH and FIND functions.

 

First, the FIND function is case sensitive, while the SEARCH function is not.

As you can see in this example, the formula in D2 returns 13 because the FIND function is looking for the first Capital B. The first capital B just happens to be the 13th character.

The formula in cell D3 is using the SEARCH function. That function isn't case sensitivity, so it returns the first B it finds (character number 3).

 

 

The Second difference between FIND and SEARCH is the ability to use Wildcard characters. The SEARCH function handles wildcard characters, while the FIND function does not.

In this example, I'm using the (?) wildcard character to tell the SEARCH function to find the first string that starts with a B and ends with a C. The first string that meets my criteria starts on character 13, so that's what I get.

 

Which one should you use?

Technically, the SEARCH function is safer to use because you won't accidentally pull the wrong position due case sensitivity.

I don't think I've ever needed to do a case sensitive find. I'll never use the SEARCH function's wildcard ability, but it's nice that it's there.

 

I'll be honest; prior to this blog post, I used the FIND function mainly out of habit. In fact, prior to Vinicius' email, I kind of forgot about the SEARCH function.

I'm going to make an effort to use the SEARCH function from now on. Well Vinicius, I guess I'm recommending the SEARCH function.

A Color is Not Data

February 25th, 2010

Ok people. Repeat after me – "A color is not data".

Every so often I get a spreadsheet from someone who thinks that colors play a major role in data management. You know – those people who happily say "I tagged those records with Yellow". Oh really? I don't think my version of Excel has a "Yellow" data type.

  » More: A Color is Not Data

Avoiding Data Cut-Off in Excel

February 3rd, 2010

It's been a busy week and I've been working hard. I think I'll reward myself by writing a blog post for people I've never met. Here we go.

Let's talk about getting Access Memo Fields into Excel.

  » More: Avoiding Data Cut-Off in Excel

Paste Special Skip Blanks

January 28th, 2010

Today, I want to show you how to use the Skip Blanks option in the Paste Special dialog box. You've all probably seen it there, but you've never used it.

Here it is in the expertly placed square box.

» More: Paste Special Skip Blanks

Clearing Access ImportError Tables

January 26th, 2010

If you move data from Excel to Access on a regular basis, you'll know that sometimes Access can't resolve the data being imported from Excel. In these cases Access automatically creates a new table called ImportErrors..
. » More: Clearing Access ImportError Tables

Using Percentages with Scroll Bars

January 21st, 2010

I recieved an email from Hari, who writes:

"I saw your post about smart scrollbars…how do I make scrollbars accept percentages?"

First of all Hari, may I say you have great taste when it comes to the Blogs you read. Now to answer your question:

Unfortunately, Scroll Bars in Excel only accept integers. That is to say, it can't pass values like .82.  The trick is to use a simple formula to convert the whole number outputs from the Scroll Bar.

. » More: Using Percentages with Scroll Bars

Adding Pictures to Your Buttons

January 4th, 2010

Welcome back from the long holiday season. OK…who forgot their passwords after two weeks of being gone? I bet a few of you had to call the help desk for a password reset.

 

Anyway, the first post of the new year is something light; how to add pictures to your buttons in Excel.

  » More: Adding Pictures to Your Buttons

Flipping a Range Upside Down

December 9th, 2009

I'm no Tiger Woods, but I get my share of lady fan mail. Today, I get an email from Dawn.

She asks: "Do you have an easy way to flip a range so that the bottom row is at the top and the top row is at the bottom?"

I have two methods for doing this.

  » More: Flipping a Range Upside Down

Getting Rid of Sticky Click

December 7th, 2009

Excel Annoyance #119: Sticky Click.

Every so often, my Excel gets into a state where no matter where or how I click, it highlights a range. That is to say, it anchors the current cell, then highlights a contiguous range from the anchored cell to wherever I'm clicking next. I call this Sticky Click.

» More: Getting Rid of Sticky Click