ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

EXCEL ¤é´Á¤¤ªº¤é¡B¤ë¼Æ­ÈŪ¨ú¬Û¤Ï¡B¦p¦ó¸Ñ¨M

EXCEL ¤é´Á¤¤ªº¤é¡B¤ë¼Æ­ÈŪ¨ú¬Û¤Ï¡B¦p¦ó¸Ñ¨M

½Ð°Ý­Y­ì©l¸ê®Æ4/1/2013ªº¸ê®Æ¬°mm/dd/yyyy¡A

¥i¬O¤@¶×¤Jexcel«o¦Û°Ê§PŪ¬°dd/mm/yyyy¡A

³oºØ±¡ªp¸Ó¦p¦ó¸Ñ¨M©O?

ÁÂÁÂ

¦^´_ 1# Mindyj

play.gif
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

·PÁª©¥D¡B¨ü¯qµL½a

TOP

½Ð±Ð¡B­Y¤£¨Ï¥Î¦¹¤èªk¸Ó¦p¦ó¸Ñ¨M©O?  ¬O§_¦³Àx¦s®æformatªº¤è¦¡©O?

ex¡GÀx¦s®æA1D/MM/YYYY
        Àx¦s®æB1¤Þ¥ÎA1§ó§ïŪ¨ú¼Æ­È¤è¦¡¬°:MM/DD/YYYY

TOP

¦^´_ 4# Mindyj
¤]¥i¥ÎVBA ³B¸Ì
  1. Option Explicit
  2. Sub Ex()
  3.     With Application
  4.         'FindFormat ÄÝ©Ê  ¶Ç¦^­n´M§ä¤§Àx¦s®æ®æ¦¡Ãþ«¬ªº·j´M·Ç«h¡C
  5.         .FindFormat.Clear
  6.         .FindFormat.NumberFormatLocal = "dd/mm/yyyy"
  7.         'ReplaceFormat ÄÝ©Ê    ³]©w¨ú¥N·Ç«h¥Î¥H¨ú¥NÀx¦s®æ®æ¦¡¡CµM«á¨ú¥N·Ç«h±N·|¥Î©ó Range ª«¥ó¤¤ Replace ¤èªkªº«áÄò©I¥s¡C
  8.         .ReplaceFormat.Clear
  9.         .ReplaceFormat.NumberFormatLocal = "mm/dd/yyyy"
  10.     End With
  11.     ActiveSheet.Cells.Replace "", "", SearchFormat:=True, ReplaceFormat:=True
  12. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

GBKEEª©¥D¡B¦pªG§Æ±æ¤£­n¥ÎVBA©O?¦]¬°®æ¦¡¤¤¦³¨âºØ®æ¦¡
¤@ºØ¬°MM-DD-YYYY¡B¥t¤@ºØ¬°dd/mm/yyyy¡A
©Ò¥H²{¦b­n§ä¤gªkÁå¿ûªº¤è¦¡§¹¦¨³o¶µ°Ê§@

TOP

¦^´_ 6# Mindyj
  1. Option Explicit
  2. Sub Ex()
  3.     Replace_Format "MM-DD-YYYY"
  4.     Replace_Format "dd/mm/yyyy"
  5. End Sub
  6. Sub Replace_Format(M As String)
  7.     With Application
  8.         'FindFormat ÄÝ©Ê  ¶Ç¦^­n´M§ä¤§Àx¦s®æ®æ¦¡Ãþ«¬ªº·j´M·Ç«h¡C
  9.         .FindFormat.Clear
  10.         .FindFormat.NumberFormatLocal = M
  11.         'ReplaceFormat ÄÝ©Ê    ³]©w¨ú¥N·Ç«h¥Î¥H¨ú¥NÀx¦s®æ®æ¦¡¡CµM«á¨ú¥N·Ç«h±N·|¥Î©ó Range ª«¥ó¤¤ Replace ¤èªkªº«áÄò©I¥s¡C
  12.         .ReplaceFormat.Clear
  13.         .ReplaceFormat.NumberFormatLocal = "mm/dd/yyyy"
  14.     End With
  15.     ActiveSheet.Cells.Replace "", "", SearchFormat:=True, ReplaceFormat:=True
  16. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

·PÁÂGBKEEª©¥D¡A³o­ÓVBA¯uªº«Ü´Î¡B«Ü¬Ù¨Æ¡C¥u¬O¨Ï¥ÎªÌ§Æ±æ³s³o­Ó¨BÆJ³£¬Ù²¤¡A©Ò¥H³Ì«á§Ú¥u¯à¥t¥~¥[¤@­ÓSHEET¨Ó°µ®æ¦¡³B²z¡A¤è¦¡¦p¤U¡G
1. ¥HT()§PÂ_¬O§_¬°¤é´Á®æ¦¡¡F
2.1 «D¤é´Á®æ¦¡¡G¥ý¥ÎVALUE(MID())¿ï¨ú»Ý­nªº¼Æ¦r¡F
2.2 ­Y¬°¤é´Á®æ¦¡«h§Q¥ÎYEAR()¡BDATE()©MDAY()®æ¦¡¶i¦æºI¨ú¼Æ¦r¡F
3. ±µµÛ¦A¥ÎCONCATENATE°µ¤å¦r²Õ¦X¡F
4. ³Ì«á¥ÎDATEVALUE()³]©w¬°¤é´Á®æ¦¡¡C

TOP

¤gªk·Ò¿û³á
¥ý§â12/2/2002©î¦¨excel¤T­ÓÀx¦s®æ
12     2      2002
±N¤T­ÓÀx¦s®æ¥æ´«¦ì¸m«á
2002       2       12
¶K¨ì °O¨Æ¥»¤º
°O¨Æ¥»¤º ¥Î/¨ú³UªÅ®æ
°O¨Æ¥»¤ºªº¸ê®Æ´N·|Åܦ¨
2002/2/12
¤§«á¶K¦^ excel

TOP

        ÀR«ä¦Û¦b : ¡i°µ¤Hªº¶}©l¡j¨C¤@¤Ñ³£¬O¬G¤Hªº¶}©l¡A¨C¤@­Ó®É¨è³£¬O¦Û¤vªºÄµ±§¡C
ªð¦^¦Cªí ¤W¤@¥DÃD