ªð¦^¦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³ò¤º
ÁÂÁÂ

¦]¸Ó¬OÃþ¦üRange("B65536").End(xlUp).Copy

TOP

¦^´_ 2# pupai
¬O³o¼Ë¶ý?
  1. Option Explicit
  2. Sub test()
  3.     Dim Rng As Range
  4.     Selection.PasteSpecial xlPasteValuesAndNumberFormats
  5.     Set Rng = Selection
  6.     Range("B" & Rng.Row).Resize(Rng.Rows.Count).Replace What:="/", Replacement:="", LookAt:=xlPart, _
  7.         SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
  8.         ReplaceFormat:=False
  9. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

With Selection
¡@¡@¡@.PasteSpecial xlPasteValuesAndNumberFormats
¡@¡@¡@.Columns(2).Replace "/", "", LookAt:=xlPart
End With

TOP

³o¼Ë½ÆÂø ¦³¨S¦³Â²¤Æª©
ÁÂÁÂ

TOP

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


­ã¤j¦n
§Aªº¤è¦¡¤ñ¸û¾A¦X§Ú
·Q¦A½Ð±Ð ¦P¼Ëªº¹D²z ³o¤@¦¸§Ú§Æ±æ¤é´ÁÂà´«
½Ð±Ð.Columns(2)§Ú­n¦p¦ó­×§ï  ÁÂÁÂ
Selection.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

TOP

¦^´_ 3# GBKEE


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

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

¦^´_ 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

¦^´_ 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

        ÀR«ä¦Û¦b : ¦³®É·í«äµL®É­W¡A¦n¤Ñ­n¿n«B¨Ó³¡C
ªð¦^¦Cªí ¤W¤@¥DÃD