Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
MKB MKB is offline
external usenet poster
 
Posts: 1
Default testing for character strings within a cell

Is there an easy way to test the contents of a cell for a particular
character string? I have a number of records that I've dumped out of an
AS400 application and need to search one column for the word "Shell". The
word is only part of the cell contents and is a varying number of spaces from
the beginning or end of each respective character string.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default testing for character strings within a cell


=IF(ISNUMBER(FIND("shell",A1)), "found","not found")

"MKB" wrote:

Is there an easy way to test the contents of a cell for a particular
character string? I have a number of records that I've dumped out of an
AS400 application and need to search one column for the word "Shell". The
word is only part of the cell contents and is a varying number of spaces from
the beginning or end of each respective character string.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default testing for character strings within a cell

Try this:

This formula returns 1 if cell A1 contains the word "shell"
=COUNTIF(A1,"*shell*")

This formula counts the number of cells in the range A1:A10 that contain the
word "shell":
=COUNTIF(A1:A10,"*shell*")

Note: COUNTIF is not case sensitive.

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"MKB" wrote:

Is there an easy way to test the contents of a cell for a particular
character string? I have a number of records that I've dumped out of an
AS400 application and need to search one column for the word "Shell". The
word is only part of the cell contents and is a varying number of spaces from
the beginning or end of each respective character string.

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
Compiling macro based on cell values simonsmith Excel Discussion (Misc queries) 1 May 16th 06 08:31 PM
Urgent date/scheduling calc needed jct Excel Worksheet Functions 3 February 24th 06 01:36 AM
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM
How to make a cell recognize multiple text strings? Tourcat Excel Worksheet Functions 1 February 8th 05 08:29 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 10:21 AM.

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"