#1   Report Post  
Posted to microsoft.public.excel.misc
ah ah is offline
external usenet poster
 
Posts: 33
Default formula

Hi;
Can anyone guide me on how to extract the text data only?
The formula that I'm currently using is:
=(LEFT(INDIRECT("Sheet1!A"&ROW()),FIND(" ",INDIRECT("Sheet1!A"&ROW()))-1))

The above formula works well when the text data apperas before the numeric
value only. But, my requirements are as follows:

Example 1:
If the contecnt is " ABC- 123", I want it to show as ABC to me.
But, if the content is "ABC DEF GH-0987", I want it to be appreared as "ABC
DEF GH" to me. The symbol "-" and numeric value should be skipped

Can I add in the istext function into the above formula?Appreciate if you
could give me a green light on this. Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default formula

Try this:

=SUBSTITUTE(A1,RIGHT(A1,SUMPRODUCT((LEN(A1)-LEN(SUBSTITUTE(A1,{0,1,2,3,4,5,6
,7,8,9,"-"},""))))),"")

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"ah" wrote in message
...
Hi;
Can anyone guide me on how to extract the text data only?
The formula that I'm currently using is:
=(LEFT(INDIRECT("Sheet1!A"&ROW()),FIND(" ",INDIRECT("Sheet1!A"&ROW()))-1))

The above formula works well when the text data apperas before the numeric
value only. But, my requirements are as follows:

Example 1:
If the contecnt is " ABC- 123", I want it to show as ABC to me.
But, if the content is "ABC DEF GH-0987", I want it to be appreared as

"ABC
DEF GH" to me. The symbol "-" and numeric value should be skipped

Can I add in the istext function into the above formula?Appreciate if you
could give me a green light on this. Thanks.


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
Reusing formula Tony29 Excel Discussion (Misc queries) 7 September 7th 06 03:34 AM
Dynamic Range with unused formula messing up x axis on dynamic graph [email protected] Charts and Charting in Excel 2 February 2nd 06 08:02 PM
Match then lookup Tenacity Excel Worksheet Functions 9 December 3rd 05 05:30 AM
Formula Problem - interrupted by #VALUE! in other cells!? Ted Excel Worksheet Functions 17 November 25th 05 05:18 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM


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