Using IF to find text + wildcard?

O

Outlook, eh?

Hello All,
I am wanting to move one of three letters from one column to another and
then make a word from it's beginning letter, i.e., F would become FRUIT.
For example:
COLUMN A COLUMN B
F,X,U =IF(A1="F","FRUIT")

This works fine if it were just F, but the comma and additional letters
indicate FALSE. I have tried "F&", "F*", "F?"

Any help would be greatly appreciated!
Bryce
 
N

N Harkawat

=if(isnumber(search("F",a1)),"fruit"," ")

if case sensitive needed replace the "search" function with "find"
 
R

Rick Rothstein \(MVP - VB\)

I am wanting to move one of three letters from one column to another and
then make a word from it's beginning letter, i.e., F would become FRUIT.
For example:
COLUMN A COLUMN B
F,X,U =IF(A1="F","FRUIT")

This works fine if it were just F, but the comma and additional letters
indicate FALSE. I have tried "F&", "F*", "F?"

Perhaps this way...

=IF(SEARCH("F",A1),"FRUIT")

SEARCH is non-case-sensitive, use FIND if you want it to be case-sensitive.

Rick
 
R

Rick Rothstein \(MVP - VB\)

I am wanting to move one of three letters from one column to another and
Perhaps this way...

=IF(SEARCH("F",A1),"FRUIT")

Wow! I screwed up two parts of that...

=IF(ISNUMBER(SEARCH("F",A1)),"FRUIT","")

Rick
 
O

Outlook, eh?

Rick,
Thanks so much, it would like a charm! But one more thing (I forgot). I
would like to do this for an entire column, which is from A1:A2568, and paste
it in the column next to it, B1:B2568. Any ideas?

Bryce
 
O

Outlook, eh?

Thanks Rick it worked very well! However, I forgot to mention one thing. I
would like to use your forumula to look through an entire column A2:A2568 and
if there is an "F", I would like to insert the word "FRUIT", in the column
next to it (B2:B2568).

Thanks so much for your help, I really, really appreciate it!
Bryce
 
R

Rick Rothstein \(MVP - VB\)

Thanks Rick it worked very well! However, I forgot to mention one thing. I
would like to use your forumula to look through an entire column A2:A2568
and
if there is an "F", I would like to insert the word "FRUIT", in the column
next to it (B2:B2568).

You will have to copy the formula down through the entire column. If you are
not sure of how to do that, highlight the cell with the formula that "works
well", look at the bottom right corner of that cell for a very small black
square... place your cursor over the black square (the cursor will turn into
a cross... a thin plus sign), left click and drag down through all of the
cells in the column. Doing this will make the relative A1 (or, if you are
starting in row 2, A2) reference change with each row so the formula is
adjusted to the row it is on.

Rick
 
Top