ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Modify Index with Match Formula (https://www.excelbanter.com/excel-worksheet-functions/217181-modify-index-match-formula.html)

Rob

Modify Index with Match Formula
 
I am trying to modify the below formula to look for a single word within a
series of cells instead of matching the entire value and if it finds the word
in a cell then it returns the value of an adjacent cell from where it was
found.

In the example below I am trying to match the word "Maybe" and if it finds
it within a string of text in a cell then it returns the value of what is in
"W"


IF(ISNA(INDEX($W:$W,MATCH("Maybe",$R:$R,0),1)),"No ",INDEX($W:$W,MATCH("Maybe",$R:$R,0),1))


Is this possible or am I S.O.L.?


Thanks In Advance,
Rob

Bernard Liengme

Modify Index with Match Formula
 
You seem to use two contradictory phrases:
a) to look for a single word within a series of cells
b) to match the word "Maybe" and if it finds it within a string of text in a
cell

Are you looking for the word MAYBE as a range of cells that each contain a
single word or a phrase? Can this word be present more than once?
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Rob" wrote in message
...
I am trying to modify the below formula to look for a single word within a
series of cells instead of matching the entire value and if it finds the
word
in a cell then it returns the value of an adjacent cell from where it was
found.

In the example below I am trying to match the word "Maybe" and if it finds
it within a string of text in a cell then it returns the value of what is
in
"W"


IF(ISNA(INDEX($W:$W,MATCH("Maybe",$R:$R,0),1)),"No ",INDEX($W:$W,MATCH("Maybe",$R:$R,0),1))


Is this possible or am I S.O.L.?


Thanks In Advance,
Rob




T. Valko

Modify Index with Match Formula
 
Try this:

=IF(COUNTIF(R:R,"*maybe*"),INDEX(W:W,MATCH("*maybe *",R:R,0)),"no")

If you use a cell to hold "maybe" :

A1 = maybe

=IF(COUNTIF(R:R,"*"&A1&"*"),INDEX(W:W,MATCH("*"&A1 &"*",R:R,0)),"no")

--
Biff
Microsoft Excel MVP


"Rob" wrote in message
...
I am trying to modify the below formula to look for a single word within a
series of cells instead of matching the entire value and if it finds the
word
in a cell then it returns the value of an adjacent cell from where it was
found.

In the example below I am trying to match the word "Maybe" and if it finds
it within a string of text in a cell then it returns the value of what is
in
"W"


IF(ISNA(INDEX($W:$W,MATCH("Maybe",$R:$R,0),1)),"No ",INDEX($W:$W,MATCH("Maybe",$R:$R,0),1))


Is this possible or am I S.O.L.?


Thanks In Advance,
Rob





All times are GMT +1. The time now is 06:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com