A couple of Excel things

Posted on Monday, January 29, 2007 02:06 PM by K. Latham
Learned to do a few things in Excel today. Here are my notes:

1. Find a string in a cell.
Excel has a function called FIND.
FIND("look for","look in","start at") = position
This works great if you want to find a word inside of a text cell. Let's say you want to see if the word "Business" is in a cell.

A
1 "Business, Personal"
2 "Personal"

Using the IF function you can do this:
=IF(FIND("Business",A1,1) <> 0,1,0)
This will return a 1.

However there a problem, if I did this:
=IF(FIND("Business",A2,1) <> 0,1,0).
You will get an error answer, #VALUE!.

To work around the error, I did this:
=IF(ISERROR(FIND("Business",A2,1)),0,1)


Why FIND doesn't just return 0 instead of an error I'll never know. This will also work with the SEARCH function.
2. Access a cell on another sheet.
To add from Sheet to Sheet within a workbook. Just add the sheet name in front of the cell, 'sheet name'!cell



Example: I have one sheet named "2007" and another named "2006". I want to get the difference between cells from year to year.

='2006'!A1-'2007'!A1