Find row number based on criteria

alfordtp

Board Regular
Joined
Oct 3, 2008
Messages
62
I'm trying to create a "find" feature for a workbook.

Lets say I have a spreadsheet with 10 columns. I am looking for the word "apple" in any of the cells in those 10 columns. It may appear in the 2nd column or the 8th column, or any other column. It also most likely will not be the first or only word in the cell (We have a "title" column, a "summary" column, and a "details" column).

Is there a function to put in column 11 that would search all cells in that row and mark (with an "X" or something) if that row contains "apple" somewhere in that row?

Thanks!
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
This solution uses an array formula so you will have to hit CTRL+ENTER after you type it so that is has {} around it and calculates correctly.

=IF(SUM(IF(ISERROR(FIND("apple",A5:J5)),0,1))>0,"X","")

If apple appears anywhere in the row from columns A:J then the cell with this formula will show an X otherwise it will be blank.
 
Upvote 0
I'm trying to create a "find" feature for a workbook.

Lets say I have a spreadsheet with 10 columns. I am looking for the word "apple" in any of the cells in those 10 columns. It may appear in the 2nd column or the 8th column, or any other column. It also most likely will not be the first or only word in the cell (We have a "title" column, a "summary" column, and a "details" column).

Is there a function to put in column 11 that would search all cells in that row and mark (with an "X" or something) if that row contains "apple" somewhere in that row?

Thanks!
One way...

=IF(COUNTIF(A1:J1,"*apple*"),"X","")
 
Upvote 0
One way...

=IF(COUNTIF(A1:J1,"*apple*"),"X","")


Woah, learned something new myself on this question. I didn't realize you could use wildcard characters with COUNTIF. I'm assuming you can use them with SUMIF too.

Very cool and much simpler formula.
 
Upvote 0
Woah, learned something new myself on this question. I didn't realize you could use wildcard characters with COUNTIF. I'm assuming you can use them with SUMIF too.
Yes.

Functions that support wildcards:

AVERAGEIF - Excel 2007 and later
AVERAGEIFS - Excel 2007 and later
COUNTIF - all versions of Excel
COUNTIFS - Excel 2007 and later
HLOOKUP - all versions of Excel
MATCH - all versions of Excel
SEARCH - all versions of Excel
SUMIF - all versions of Excel
SUMIFS - Excel 2007 and later
VLOOKUP - all versions of Excel

Very cool and much simpler formula.
:cool:
 
Upvote 0

Forum statistics

Threads
1,223,243
Messages
6,170,967
Members
452,371
Latest member
Frana

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