Left function or something else

  • Thread starter Thread starter Manos
  • Start date Start date
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
 
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
 
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
 
Back
Top