MATCH STRING IN A COLUMN AND RETURN ALL ROWS (entire row) THAT MATCH THE STRING

Ratnesh

New Member
Joined
May 14, 2020
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Dear Team Members,

Hope you are all doing well.


I need some help with regards to my excel file. (Sample file attached)
sample file.JPG

I have an array containing data into rows and columns.
I want to search for a string in one of the columns (Lets say the first column)
For eg : In the attached file, I have shown the search text as "red"

I want the formula to search in the entire column for the string "red" and return the entire row as outputs.

So If "red" appears 5 times .. it should return all those 5 rows where the text "red" appears.

I have shown the desired output as well in my excel file.

Please help !!
smile.gif
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Welcome to the Board!

Have you thought of using Filters (to filter in place) or Advanced Filters (to filter to a new location)?

Filters are pretty straightforward. Just select the whole range, and then click the Filter button.
Then go to the drop down on your Items field, and choose Text Filters -> Contains -> red

For Advanced Filters (to filter to a new location), see: Excel Advanced Filter Introduction
The value of the Items you are looking for would be *red*
 
Upvote 0
Hi & welcome to MrExcel.
How about

+Fluff New.xlsm
ABCDE
1
2Red Apple1goodyes2 days
3Red dragon3fairyes1 day
4white apple2averageno3 days
5white dragon4badno1 week
6yellow banana6goodyes4 days
7red mango7very goodno5 days
8
9SearchRed
10
11Red Apple1goodyes2 days
12Red dragon3fairyes1 day
13red mango7very goodno5 days
14
MB52
Cell Formulas
RangeFormula
A11:E13A11=FILTER(A2:E7,ISNUMBER(SEARCH(B9,A2:A7)))
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,279
Members
449,075
Latest member
staticfluids

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