LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 829
Default LEFT function not working with dates

"Excel Dumbo" wrote:
I am trying to build a forumula to get the result
"Jul-12" from the given value "Jul-11"
This is what i tried and I was getting a result "407-12"
not sure if this is a formating issue
Date Jul-11
=LEFT(A2,3),"-","12"


(That is not the formula that you used. It is invalid syntax. In the
future, copy-and-paste formulas from the Formula Bar, especially when you
have a syntax question.)

It appears that dates are stored as Excel "serial numbers", which is normal.
It appears as Jul-11 due to the cell format.

And apparently, Jul-11 represents a date in July 2011 -- serial numbers
40725 to 40755.

If A1 displays Jul-11 and you want the same date a year later (Jul-12), you
can write:

=EDATE(A1,12)

in a cell, and format the cell as Custom mmm-yy, the same format as A1.

If that formula produces a #NAME error, see the help page for EDATE for
instructions for enabling the ATP.

Alternatively, you can use the following formula:

=DATE(1+YEAR(A1),MONTH(A1),DAY(A1))

Do __not__ use the formula =A1+365 or =A1+365.25 . Neither works reliably
around leap years.

In fact, even the DATE formula might not work as intended if A1 is Feb 29.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
LEFT function-all to left of a comma? Jennifer F Excel Worksheet Functions 1 January 21st 09 11:19 PM
Up,Down,Left,Right stopped working Ian B[_2_] Excel Discussion (Misc queries) 2 November 17th 08 09:53 PM
Newly created Get Function is not working when I copied the syntax from a working function CJ Excel Programming 1 January 16th 07 05:28 AM
Sort Left to Right not working Juan Excel Discussion (Misc queries) 3 July 29th 05 07:26 PM
Left and Right function is not working kvenku[_4_] Excel Programming 4 April 28th 04 01:30 PM


All times are GMT +1. The time now is 05:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"