IF contains THEN return cell

lavezzi7

New Member
Joined
Dec 12, 2017
Messages
15
Hey guys,

I have an excel sheet where cells A1-A10 containing text.

Then i would like to get the cells in another sheet but only if they contain a certain text.

For instance, I would like to place in the new sheet a cell (among A1-A10) that contains the text "win".

The formula should return the whole text in the cell and if others have also the same text, they should be shown in another cell.

Any ideas of how can I do that?

Thanks in advance!
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Assuming data in Sheet1 A1:A10

Try this array formula in, say, Sheet2 A2 copied down
=IFERROR(INDEX(Sheet1!A$1:A$10,SMALL(IF(ISNUMBER(SEARCH("win",Sheet1!A$1:A$10)),ROW(Sheet1!A$1:A$10)-ROW(Sheet1!A$1)+1),ROWS(A$2:A2))),"")
confirmed with Ctrl+Shift+Enter, not just Enter

Hope this helps

M.
 
Upvote 0
It did not really worked for me, maybe I am doing somthing wrong, to clarify it better:

https://ibb.co/dZtGN6

I am trying to find a formula that will look in the range of the left and return the ones which contain the word win at another cell.
 
Upvote 0
Try

Array formula in D2 copied down
=IFERROR(INDEX(A$2:A$13,SMALL(IF(ISNUMBER(SEARCH("win",A$2:A$13)),ROW(A$2:A$13)-ROW(A$2)+1),ROWS(D$2:D2))),"")
confirmed with Ctrl+Shift+Enter, not just Enter

Formula in E2 copied down
=IF(D2="","",VLOOKUP(D2,A$2:B$13,2,0))
confirmed with just Enter

M.
 
Upvote 0

Forum statistics

Threads
1,223,912
Messages
6,175,340
Members
452,638
Latest member
Oluwabukunmi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top