#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default search array

Hi,

I have two columns containing names. there are some spelling and other
errors. I am trying to use a search function combined with an array and
Left(cell,4) functions to determine if the first four characters in the
column B match any of the names in column C.

Example:
B C
johnnathan, doe johnathen, doe
Smith, Jane Jane smith


if the first four characters match, i would like the cell containing the
formula to result with the name in column C that matches.

my attempt:
=if(isnumber(search((left,B3,4)),$C$3:$C$141),$C$3 :$C$141,"") CSE

Thanks!


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default search array

How about this in D1:
=COUNTIF(C:C,"*"&LEFT(B1,4)&"*")0
and drag down.

jchick0909 wrote:

Hi,

I have two columns containing names. there are some spelling and other
errors. I am trying to use a search function combined with an array and
Left(cell,4) functions to determine if the first four characters in the
column B match any of the names in column C.

Example:
B C
johnnathan, doe johnathen, doe
Smith, Jane Jane smith

if the first four characters match, i would like the cell containing the
formula to result with the name in column C that matches.

my attempt:
=if(isnumber(search((left,B3,4)),$C$3:$C$141),$C$3 :$C$141,"") CSE

Thanks!


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default search array

That seems to be working somewhat, how can i alter the formula so that
instead of a true and fasle reslut, the formula results with the cell in
column C that matches the Left(cell,4) function?

side note: can you explain what the "*" does?

Thanks!

"Dave Peterson" wrote:

How about this in D1:
=COUNTIF(C:C,"*"&LEFT(B1,4)&"*")0
and drag down.

jchick0909 wrote:

Hi,

I have two columns containing names. there are some spelling and other
errors. I am trying to use a search function combined with an array and
Left(cell,4) functions to determine if the first four characters in the
column B match any of the names in column C.

Example:
B C
johnnathan, doe johnathen, doe
Smith, Jane Jane smith

if the first four characters match, i would like the cell containing the
formula to result with the name in column C that matches.

my attempt:
=if(isnumber(search((left,B3,4)),$C$3:$C$141),$C$3 :$C$141,"") CSE

Thanks!


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default search array

The asterisk is a wild card--it represents any number of characters. The
question mark is another wildcard--it represents a single character.

I don't think you could tweak that formula. But you could use this one instead:
=INDEX(C:C,MATCH("*"&LEFT(B1,4)&"*",C:C,0))
(In D1 and drag down)

It'll show the value of the cell (in column C) that matches.

jchick0909 wrote:

That seems to be working somewhat, how can i alter the formula so that
instead of a true and fasle reslut, the formula results with the cell in
column C that matches the Left(cell,4) function?

side note: can you explain what the "*" does?

Thanks!

"Dave Peterson" wrote:

How about this in D1:
=COUNTIF(C:C,"*"&LEFT(B1,4)&"*")0
and drag down.

jchick0909 wrote:

Hi,

I have two columns containing names. there are some spelling and other
errors. I am trying to use a search function combined with an array and
Left(cell,4) functions to determine if the first four characters in the
column B match any of the names in column C.

Example:
B C
johnnathan, doe johnathen, doe
Smith, Jane Jane smith

if the first four characters match, i would like the cell containing the
formula to result with the name in column C that matches.

my attempt:
=if(isnumber(search((left,B3,4)),$C$3:$C$141),$C$3 :$C$141,"") CSE

Thanks!


--

Dave Peterson


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Which Function to Use? Search an Array, Return a Row Value [email protected] Excel Discussion (Misc queries) 1 August 24th 07 06:34 PM
Defining an array to search by Justlearnin Excel Discussion (Misc queries) 4 April 25th 07 04:59 PM
Text Search in an Array Jay Excel Worksheet Functions 1 September 12th 06 11:37 PM
Text Search in an Array Jay Excel Discussion (Misc queries) 1 September 12th 06 11:23 PM
Search array and return element No Ron Excel Worksheet Functions 7 May 17th 06 05:27 AM


All times are GMT +1. The time now is 02:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"