View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ShaneDevenshire ShaneDevenshire is offline
external usenet poster
 
Posts: 2,344
Default Extract Part of a Cells Contents Q

Hi,

All the suggestions you have recieved work for your example, here is a more
generic solution:

=MID(A1,FIND("(",A1)+4,FIND(")",A1)-FIND("(",A1)-4)

or if you want the data as a value

=--MID(A1,FIND("(",A1)+4,FIND(")",A1)-FIND("(",A1)-4)

These will work if your dates are entered as 1/1/01 or anything else other
than the 10 digit date format shown in your post. They will also handle
trailing text, after the ) such as a period. However, they won't handle a
string longer or short than "as ".

--
Thanks,
Shane Devenshire


"Seanie" wrote:

I saw yesterday a post on extracting art of a cells contents, I have
tried to twaek it to fit my requirements but am lost as to how to.

The formula that I tried to tweak is:

="Accounts for Period - "&LEFT(TRIM(MID(A2,FIND("-",A2)+1,99))&"
",FIND(" ",TRIM(MID(A2,FIND("-",A2)+1,99))&" ")-1) - The will return
"Accounts for Period - October'08"

The Text in A2 is

^Accounts Reconciliation - October'08 (at 08/11/2008)

What I want to extract is only the text 08/11/2008 - i.e. everything
within the brackets, but not the brackets themselves or the word 'at'