Find Text

SLHayden

New Member
Joined
Jul 3, 2011
Messages
22
I need a formula that will find which cell in a column has text in it, and then return what ever is in that cell.

For Example: The selection of cells A1:A20, if cell A15 has "DOG" in it (all other will be blank) A22 will will return "DOG".

The text in the cell will not be a specific word.
 
Last edited:

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
So only 1 cell in the range will contain a text value, all others will be blank?

Try

=LOOKUP(REPT("z",255),A1:A20)

It will error if ALL cells are blank.


Hope that helps.
 
Upvote 0
I think I am doing something wrong. I pasted the formula into the spreadsheet, worked like a charm. Once I replaced the lookup vector with the actual cells I need there is nothing returned (not "0", "False") just a blank cell. There is a populated cell in the selection.
 
Upvote 0
Are the blanks in your range truely blank, or are they formulas that return "" ?
 
Upvote 0
jonmo1 thanks I got it to work I just remove the "" and let the formula return "0" and it worked out.
 
Upvote 0
jonmo1 thanks I got it to work I just remove the "" and let the formula return "0" and it worked out.

When there are formula blanks along with other text value(s)...

=LOOKUP(9.99999999999999E+307,SEARCH("?",A1:A20),A1:A20)

will do as well.
 
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,740
Members
452,940
Latest member
Lawrenceiow

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