if statements

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Excel Training and help » IF statements

IF statements

resolvedResolved · Medium Priority · Version 2007

Tracey has attended:
Excel Advanced course
Excel VBA Intro Intermediate course

IF statements

How can I do more with IF statements eg not IF cell A1 = cell B1 but IF B1 contains A1, or starts with A1?

RE: IF statements

Hello Tracey
Thank you for your question

Try the following formula where you want to check if a cell contains some text:

=IF(ISNUMBER(SEARCH("*dog*",A1)),"dog","")

In this example, if the A1 field contains 'dog' anywhere in the cell then 'dog' will be the result of the formula cell. You can change the second dog in the formula to read 'true' or whatever you want.

If you want to see if the cell starts with 'dog' then in a seperate column (for example column B) use the following formula:

=LEFT(A1,3)

This will return the first three letters of the start of the word. In another colun you can use the following formula:

=IF(B1="dog",TRUE,FALSE)

Dont forget that you can hide some of these columns if you dont want them to be seen. The best way to learn more about formulas and IF statements is the take each problem as it comes and research the formula on the internet as many people have often asked the same question before.

If this resolves your question, please mark it as resolved. If not, please reply with more information.

Kind regards
Cress

Wed 25 Feb 2009: Automatically marked as resolved.


 

Excel tip:

Removing the Ribbon from view in Excel 2010

At times when you want to view the whole spreadsheet, try double clicking on the ''Home'' tab on the ribbon which will hide the ribbon from view.

View all Excel hints and tips


Server loaded in 0.08 secs.