Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Leben
 
Posts: n/a
Default Can I search a cell for a value and extract part of content?

I want to test a cell using something like a "substring" looking for 5
characters. If I find a match I want to capture an use the 4 postion numeric
value in another cell. Example: A1 contains "SALES 4567". I want to test
cell A1 for "SALES" and If I find the value "SALES" I want to capture the
numeric value "4567" in cell N1.

Thanks, JOHN
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max
 
Posts: n/a
Default Can I search a cell for a value and extract part of content?

Try in N1:

=IF(ISNUMBER(SEARCH("SALES",A1)),SUBSTITUTE(A1,"SA LES","")+0,"")

Replace SEARCH with FIND
if you need the check on the text to be case sensitive
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"Leben" wrote in message
...
I want to test a cell using something like a "substring" looking for 5
characters. If I find a match I want to capture an use the 4 postion

numeric
value in another cell. Example: A1 contains "SALES 4567". I want to

test
cell A1 for "SALES" and If I find the value "SALES" I want to capture the
numeric value "4567" in cell N1.

Thanks, JOHN



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



All times are GMT +1. The time now is 10:50 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"