Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default extract text

if i have different text strings, but in all of them there will by a dollar amount

example:
aif2ffsdfij$39.99&3kgjcis
o
qe141$29.99.cw.e.331

how would i go about extracting the formul

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default extract text

Hi
and what do you exactly want to extract. The dollar amount?

--
Regards
Frank Kabel
Frankfurt, Germany

"choice" schrieb im Newsbeitrag
...
if i have different text strings, but in all of them there will by a

dollar amount.

example:
aif2ffsdfij$39.99&3kgjcism
or
qe141$29.99.cw.e.3312

how would i go about extracting the formula


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default extract text

Do you mean the amount?

=MID(A1,FIND("$",A1),FIND(".",A1)+2-FIND("$",A1)+1)

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"choice" wrote in message
...
if i have different text strings, but in all of them there will by a

dollar amount.

example:
aif2ffsdfij$39.99&3kgjcism
or
qe141$29.99.cw.e.3312

how would i go about extracting the formula



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default extract text

Are you looking for something like this?

Sub test()
MsgBox cash$("aif2ffsdfij$39.99&3kgjcism")
MsgBox cash$("qe141$29.99.cw.e.3312")
End Sub

Function cash$(s$)
Dim pos1%, pos2%
pos1% = InStr(1, s$, "$")
pos2% = InStr(pos1%, s$, ".")
cash$ = Mid$(s$, pos1%, pos2% + 3 - pos1%)
End Function


choice wrote:
if i have different text strings, but in all of them there will by a dollar amount.

example:
aif2ffsdfij$39.99&3kgjcism
or
qe141$29.99.cw.e.3312

how would i go about extracting the formula


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
refer a cell text in b1 and extract remaing text from a1 Narnimar Excel Discussion (Misc queries) 4 April 3rd 10 12:30 PM
How to extract text from number/text cell Access Joe Excel Worksheet Functions 6 December 1st 09 07:35 PM
Need to extract certain text from text string Trista @ Pacific Excel Worksheet Functions 4 November 21st 07 07:07 PM
Extract text from large Text ldiaz Excel Discussion (Misc queries) 4 November 14th 07 01:21 AM
EXTRACT TEXT FROM TEXT STRING carricka Excel Worksheet Functions 4 July 8th 05 11:00 AM


All times are GMT +1. The time now is 08:02 AM.

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

About Us

"It's about Microsoft Excel"