View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.misc
RagDyeR RagDyeR is offline
external usenet poster
 
Posts: 3,572
Default Get part of text in a Cell

I kind of doubt that ... but it's up to the OP to mention that.<bg
--

Regards,

RD
-----------------------------------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
-----------------------------------------------------------------------------------------------

"Pete_UK" wrote in message
...
Well, you'll also need to look for the closing square bracket because you
might just have one without the other.

Pete

"RagDyeR" wrote in message
...
How about:

=IF(ISNUMBER(FIND("[",F6)),MID(F6,FIND("[",F6),FIND("]",F6)-FIND("[",F6)+1),"")

?

--

Regards,

RD
-----------------------------------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
-----------------------------------------------------------------------------------------------


"Pete_UK" wrote in message
...
You can do it like this:

=IF(ISERROR(MID(F6,FIND("[",F6),FIND("]",F6)-FIND("[",F6)+1)),"",MID(F6,FIND("[",F6),FIND("]",F6)-FIND("[",F6)+1))

Hope this helps.

Pete

"Marcha" wrote in message
...
Thank you Pete - very useful (copy/paste)... I just had to change the
commas
(,) with simmi collons (;)

Now I would like to get no results if the 'Code' is not there yet - if
the
Member is new... There comes a #Value in Cell - and want nothing - just
blank. Is that possible?



"Pete_UK" wrote:

Put this formula in J6:

=MID(F6,FIND("[",F6),FIND("]",F6)-FIND("[",F6)+1)

Hope this helps.

Pete

"Marcha" wrote in message
...
I don't know how to search for this Function - but I'm sure I have seen
it.

I have a text-cell - and in that cell I want to retrieve a 'Code' that
is
placed within the cell. The 'Code' is between a [ and ] - like: [OT] 1
june.
I want the [OT] to be written in another cell in the row. (Don't wanna
remove it from the current cell - just copy it)
I know I can get the posistion with FIND("[";F6) and FIND("]";F6)
Now I just want to place it in J6 - something like: GetText(F6;1;3) -
and
the result would be [OT] in the cell F6 :D

Thank you for easing a lot of minds :)