Wednesday, September 21, 2011

Excel 2010

I have recently made the move to Excel 2010. Do I like it? I don't know yet. I'm getting older and change bugs me. I'm still getting used to it, and I'm not seeing a bunch of advantages yet. As soon as I learn a new 2010 trick, I will share!

Saturday, March 5, 2011

Challenge

Someone recently asked me to help with an Excel problem he was trying to solve. I don't think I solved his problem, but I added a neat new trick to my bag.

The question (not necessarily the question asked) I found a solution to was this: is it possible to extract one precise word from a string no matter where it is in the string? We've already seen that it's possible to extract words or numbers based on their position in a string using mid, left and right.

The answer: the SEARCH Function!
search

You can read above to see what it does.

To get it to actually return the word, you have to nest this with an ISERROR

iserro

The formula itself is:
=IF(ISERROR(SEARCH("credit",A2,1)),A2,"credit")

In english, if the SEARCH function does not find the word "credit", return the value in A2, otherwise, return the word "Credit"

Here it is in action:
result