Left function or something else

M

Manos

Dear all,

I have in B1 the following "02/2004 YTD"

There is anyway to have a formula in order to bring in
a1 the: "01/2004 YTD" ?
or "01/2003 YTD"?

I tried the left function and heve this =LEFT(B1;2)-1 and
manage to have the 01. The problem is that i can not
bring all i want.

Any suggestions?

Thanks in advance Manos
 
J

JudithJubilee

You can combine the left with Concatenate and Right:

=CONCATENATE((LEFT(B1,2)-1),RIGHT(B1,9))

This gives 01/2004 YTD

=CONCATENATE(LEFT(B1,6),(MID(B1,7,1)-1),RIGHT(B1,4))

This will give you 02/2003 YTD

Hope this helps
Judith
 
F

Frank Kabel

Hi Judith
your first formula would return
1/2004 YTD and not
01/2004 YTD

so you may use
TEXT(LEFT(B1,2)-1,"00") & RIGHT(B1,9)
instead
 
M

Manos

Thank you Frank

You are very helpfull
-----Original Message-----
Hi
try
=TEXT(--LEFT(B1,2)-1,"00") & MID(B1,3,20)

--
Regards
Frank Kabel
Frankfurt, Germany


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top