Find word within cell & put value in adjacent

Solved/Closed
Mr.G - Updated on Dec 21, 2018 at 04:20 AM
 BogelBot - Sep 9, 2017 at 12:38 PM
Hello,

I'd like to scan a column for a certain word (e.g. "apple") and put a code (e.g. "A") on the cell next to it each time it finds it. In this case, "apple" might be by itself or in the middle of a sentence.

System Configuration: Windows XP Internet Explorer 7.0

10 replies

mubashir aziz
Posts
190
Registration date
Sunday April 12, 2009
Status
Member
Last seen
February 16, 2010
160
Updated on Dec 21, 2018 at 04:21 AM
Hi,

Suppose your data is from A1 to A100 or onward. Then in B1, copy this formula and drag it down:

=IF(ISERROR(SEARCH("*apple*",A1,1)),"","A ")


Hope, it will help!

Never ashamed to get or give Advise.
Muhammad Mubashir Aziz , Lodhran, Pakistan
122
Hello,
the formula [=IF(OR(ISERROR(SEARCH("*apple*",a1,1)),"","A ")] works great, but what if I want to use multiple criteria with wild characters.
EG: *apple* = A
*orange* = B
*grapes* = C
if any thing other than apple, orange or grapes, it should show 'D'

Hope you would respond.

Thanks in advance

Configuration: Windows XP Internet Explorer 7.0
0
mubashir aziz
Posts
190
Registration date
Sunday April 12, 2009
Status
Member
Last seen
February 16, 2010
160 > brad
Sep 4, 2009 at 12:58 AM
Try it dude ...

=IF(ISERROR(SEARCH("*apple*",A1,1)),IF(ISERROR(SEARCH("*orange*",A1,1)),IF(ISERROR(SEARCH("*grapes*",A1,1)),"","C"),"B"),"A")



0
Jon > mubashir aziz
Posts
190
Registration date
Sunday April 12, 2009
Status
Member
Last seen
February 16, 2010

Nov 18, 2009 at 11:51 AM
Same method above, but is it possible to do this using VBA? I have too many Groups for the formula bar.


Put

Apple 1
Apple 2
Apple 3
---------------
into Group 1


Orange 1
Orange 2
Orange 3
---------------
into Group 2

Berries 1
Berries 2
Berries 3
---------------
into Group 3

Lastly, what if Apples contain characters/symbols such as %$@!(), how do you make VBA treat these symbols as text?
0
This is very nice it solved my problem
0
SEARCH PARTICULAR VALUE FROM 3 CELLS CONTAINNG FALSE VALUE IN CELLS
0