Excel 2010 date formatting not working on some cells but on others

て烟熏妆下的殇ゞ 提交于 2019-12-03 21:04:49

Too long to fit in a Comment. The left-aligned ones are strings, which can be manipulated into date/time serial numbers recognised by Excel (where not nonsense like 19/19/2013). At the moment they are US format (MDY) and the "months" (in your configuration) exceed 12. The real problem however is the ones Excel has recognised, because it has created date/time serial numbers for these - but not the right ones. So 05/02/2013 it believes to be February 5, whereas if from the same source and hence style as the other dates, it actually is supposed to represent May 2.

Conversion of both text and 'wrong' dates into 'conventional' date serial numbers is possible but much more work than stepping back a stage and 'feeding' Excel with the 'right' data to begin with. For example keying it in 'properly' in the first place, rearranging the format in the source, or importing it with appropriate conversion from MDY to DMY (eg step 3 of 3 in the Text Import Wizard).


Edit re comment

Be it upon your own head but for "how I could modify 'left aligned' values (strings) to dates?":

=DATE(RIGHT(A4,4),LEFT(A4,FIND("/",A4,2)-1),MID(A4,FIND("/",A4)+1,2))  

For "I am only interest in the year part" maybe (this is 'safe'):

=IFERROR(YEAR(A4),RIGHT(A4,4))+0

Also, to explain the 'odd' four digit values

Taking the last for example (02/08/2012) it is a representation of February 8, 2012, which in Excel's 1900 date system is a date serial number of 40947 (roughly the number of days since 1/1/1900, when the 'meter started'). The four digits furthest to the right are 0947.

Switching to the first example (02/05/2013) that is a representation of February 5, 2013. Almost a full year (363 days) later than the last example. Ignoring the thousands, 947 (from above) + 363 = 1310.

Bogdan

I've had the same problem (after formatting, some cells were o.k. while some were not). What worked for me was:

  1. Select the entire range of interest.
  2. Format the range to the wanted date format (one corresponding to the already existing layout of the dates, i.e. if what you now have is 1/15/14, then use "English US" and choose, for example, "March 4, 2011" format - the point here being that you match the format with the layout you have (MM/DD/YY = MM/DD/YY).
  3. Go to "Data", go to "Text to Columns", go "Delimiters", eliminate all delimiters, go next, select date and choose the format corresponding to your selected date format (in my case I chose MDY). Thank you all for your input.

Not quite sure what you are asking for exactly, but it seems like you want to reformat a US based date to a European format. If i deciphered your question correctly, then maybe the below will help.

The formula in the cell beneath 'European' is =TEXT(A2,"dd/mm/yyyy")

Review this link for more information: http://office.microsoft.com/en-us/excel-help/text-function-HP010062580.aspx

Can you please elaborate on how the image below does not fit your needs?

I've had all exactly the same problems - some fields changing and others not.

Turns out the fields that didn't change had a space after the data (already present when imported into Excel).

I Removed the space and excel instantly changed it into desired format!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!