[Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register]

Author Message
scsijon
Newbie

Joined: 24 May 2009
Posts: 4

range
General User

Joined: 04 Jan 2012
Posts: 21

Posted: Tue Feb 14, 2012 4:01 pm    Post subject:

I think this might be what you require:

 Code: =LEFT(A1; SEARCH("-[0-9]"; A1)-1) =RIGHT(A1; LEN(A1)-SEARCH("-[0-9]"; A1))

You have to enable regular expressions for the formulae to work...
Tools>Options>OpenOffice.org Calc>Calculate>Check "Enable Regular Expressions in Formulae"
karolus

Joined: 22 Jun 2011
Posts: 208

Posted: Wed Feb 15, 2012 4:29 am    Post subject:

Hallo
Exactly you need:
 Code: =LEFT(A1;SEARCH("-[-0-9.]*\$";A1)-1)

and
 Code: =MID(A1;SEARCH("-[-0-9.]*\$";A1)+1;99)

Karo
range
General User

Joined: 04 Jan 2012
Posts: 21

Posted: Thu Feb 16, 2012 3:15 am    Post subject:

karolus wrote:
Hallo
Exactly you need:
 Code: =LEFT(A1;SEARCH("-[-0-9.]*\$";A1)-1)

and
 Code: =MID(A1;SEARCH("-[-0-9.]*\$";A1)+1;99)

Karo

Yes that is a better solution.

I think this might be suitable...

 Code: =LEFT(A1;SEARCH("-([-0-9.]|git|rc|r)*\$";A1)-1)

 Code: =MID(A1;SEARCH("-([-0-9.]|git|rc|r)*\$";A1)+1;99)
karolus

Joined: 22 Jun 2011
Posts: 208

Posted: Thu Feb 16, 2012 4:00 am    Post subject:

Hallo

Oh, I see - there are some 'git' , 'rc' and 'r' in the version-number, but your formula go wrong too !
Better:
 Code: =LEFT(A1;SEARCH("-[-0-9.cgirt]*\$";A1)-1)

and
 Code: =MID(A1;SEARCH("-[-0-9.cgirt]*\$";A1)+1;99)

Karo
scsijon
Newbie

Joined: 24 May 2009
Posts: 4

 Posted: Wed Apr 11, 2012 10:46 pm    Post subject: absolute magic folks, that last one, with the addition of a couple of extra words after cgirt in the formula has sorted it nearly out for me.
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 All times are GMT - 8 Hours Page 1 of 1

 Jump to: Select a forum OpenOffice.org Forums----------------Setup and TroubleshootingOpenOffice.org WriterOpenOffice.org CalcOpenOffice.org ImpressOpenOffice.org DrawOpenOffice.org MathOpenOffice.org BaseOpenOffice.org Macros and APIOpenOffice.org Code Snippets Community Forums----------------General DiscussionSite Feedback
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum