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

[µo°Ý] ¦p¦óÅý°õ¦æ¥¨¶°ªº½d³ò¡A­è¦n¦b³o¤@¦¸½Æ»sªº½d³ò¤º

[µo°Ý] ¦p¦óÅý°õ¦æ¥¨¶°ªº½d³ò¡A­è¦n¦b³o¤@¦¸½Æ»sªº½d³ò¤º

·Q½Ð±Ð¦U¦ì
§Ú¼g¤F¤@­Ó¥¨¶°
Sub test()
Selection.PasteSpecial xlPasteValuesAndNumberFormats
Range("B2").Replace What:="/", Replacement:="", LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False
End Sub

¨C¦¸¨Ï¥Î¥¨¶°«e
§Ú·|¥ý¥Î·Æ¹«¿ï¾Ü§Ú­n½Æ»sªº½d³ò(¨C¦¸½d³ò³£¤£¤@¼Ë)
¦A¥Î·Æ¹«ÂI¿ï¨ì§Ú­n½Æ»sªº¥Ø¦aÄæ¦ìA2¡AµM«á±Ò°Ê¥¨¶°
²Ä¤@¦¸¥i¥H¥Î¡A¦ý²Ä¤G¦¸´N¤£¦æ
¦]¬°§Ú¦pªG¥Ø¦aÅÜA5©Î¨ä¥L¦a¤è¡A³o­Ó¥¨¶°«o¥u·|§ïÅÜB2½d³ò¡A¦Ó¤£¬O§Ú­nªºB5½d³ò©Î¨ä¥L¦a¤è½d³ò

§Ú´¿¹Á¸Õ§â
Range("B2").Replace What:="/", Replacement:="", LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False

§ï¬° Range("B:B")  ¦ýµ{¦¡«o§â¾ã­ÓBÄæ¦ì³£¨ú¥N (³o¤£¬O§Ú·Q­nªº)

§Ú§Æ±æ ¦pªG½Æ»sRange(" A2:G2")¡Aµ{¦¡¥i¥HÀ°§Ú¥u§ïRange("B2")
                 ©Î½Æ»sRange(" A5:G10")¡Aµ{¦¡¥i¥HÀ°§Ú¥u§ïRange("B5:B10")

·Q½Ð±Ð¦U¦ì¡A§Ú³o¤@¬qBÄæ¦ì­n¦p¦ó­×§ï¡A¤~¥i¥H­è¦n¥u¸¨¦b§Ú³o¤@¦¸½Æ»sªº½d³ò¤º
ÁÂÁÂ

¦^´_ 14# ­ã´£³¡ªL


    ÁÂÁ­ã¤j«ü¾É
           °²¤é´r§Ö

TOP

¦^´_ 13# pupai


³sÄòÄæ¦ì:
With Selection
¡@¡@¡@Range(.Columns(2), .Columns(4)).Select
End With
©Î
With Selection
¡@¡@¡@.Columns(2).Resize(, 3).Select
End With

¸õÄæ¡G
With Selection
¡@¡@¡@Union(.Columns(2), .Columns(4)).Select
End With
¡@

TOP

¦^´_ 12# ­ã´£³¡ªL


      ½Ð±Ð­ã¤j
«e´£¤@¼Ë¦b¬J¦³ªº¿ï¾Ü°Ï¤º , ¦A¿ï¤@¦¸§Ú­nªº½d³ò®É
¦pªG¥ÎColumns()®É¡A¦ý³o¤@¦¸§Ú·Q­n¿ï¾Ü­Ç­Ó¥H¤WªºÄæ¦ì
½Ð°Ý­n¦p¦ó­×§ï
ÁÂÁÂ

TOP

¦^´_ 9# pupai


Selection.PasteSpecial xlPasteValuesAndNumberFormats
With Selection.Columns(2)
      .TextToColumns Destination:=.Cells, DataType:=xlDelimited, _
         TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
         Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo:=Array(1, 10), TrailingMinusNumbers:=True
End With

TOP

¦^´_ 10# GBKEE


    G¤j
­è¸Õ¤F¤@¤U¡AÁÙ¬O±o¥Î§Aªº¤èªk¤~¦æ
ÁÂÁÂ!!   °²¤é´r§Ö

TOP

¦^´_ 9# pupai
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex()
  3.     Dim Rng As Range
  4.     Selection.PasteSpecial xlPasteValuesAndNumberFormats
  5.     Set Rng = Selection
  6.      With Range("B" & Rng.Row).Resize(Rng.Rows.Count)
  7.             .Cells.TextToColumns Destination:=.Cells, TextQualifier:=xlNone, DataType:=xlDelimited, _
  8.             ConsecutiveDelimiter:=True, FieldInfo:=Array(1, 5), TrailingMinusNumbers:=True
  9.     End With
  10. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 8# ­ã´£³¡ªL

­ã¤j¦n
Columns(2)¥u¥i¥HÀ°§Ú§ï¤@­ÓÀx¦s®æ
¦ý¬O§Ú§Æ±æ ¦pªG½Æ»sRange(" A2:G2")¡Aµ{¦¡¥i¥HÀ°§Ú¥u§ïRange("B2")
                 ©Î½Æ»sRange(" A5:G10")¡Aµ{¦¡¥i¥HÀ°§Ú¥u§ïRange("B5:B10")
½Ð±Ð§Ú­n¦p¦ó­×§ï
ÁÂÁÂ

TOP

¦^´_ 6# pupai


With Selection
¡@¡@¡@.PasteSpecial xlPasteValuesAndNumberFormats
¡@¡@¡@With .Columns(2)
¡@¡@¡@¡@¡@¡@.Replace "//", "", LookAt:=xlPart
¡@¡@¡@¡@¡@¡@.TextToColumns Destination:=Selection, DataType:=xlDelimited, _
¡@¡@¡@¡@¡@¡@¡@¡@TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
¡@¡@¡@¡@¡@¡@¡@¡@Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo:=Array(1, 10), TrailingMinusNumbers:=True
¡@¡@¡@End With
End With

¤j¬ù¦ê¤å¦r½X¡A½Ð¦Û¦æ´ú¸Õ¡I

TOP

¦^´_ 3# GBKEE


   G¤j
§Aªº¤èªk,§ÚÁÙ­n§V¤O¤¤
ÁÂÁÂ

TOP

        ÀR«ä¦Û¦b : ¡i¥Í©R¦b©I§l¶¡¡j¦òªû»¡¡G¡u¥Í©R¦b©I§l¶¡¡C¡v¤HµLªkºÞ¦í¦Û¤vªº¥Í©R¡A§óµLªk¾×¦í¦º´Á¡AÅý¦Û¤v¥Ã¦í¤H¶¡¡C¬JµM¥Í©R¥h¨Ó³o»òµL±`¡A§Ú­Ì§óÀ³¸Ó¦n¦n¦a·R±¤¥¦¡B§Q¥Î¥¦¡B¥R¹ê¥¦¡AÅý³oµL±`¡BÄ_¶Qªº¥Í©R¡A´²µo¥¦¯uµ½¬üªº¥ú½÷¡A¬M·Ó¥X¥Í©R¯u¥¿ªº»ù­È¡C
ªð¦^¦Cªí ¤W¤@¥DÃD