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

[µo°Ý] ¦p¦ó¨Ï¥ÎVBA±N­Ó¸êÁô½X

[µo°Ý] ¦p¦ó¨Ï¥ÎVBA±N­Ó¸êÁô½X

¥»©«³Ì«á¥Ñ coldedge ©ó 2020-7-22 11:44 ½s¿è

¦U¦ì¦n
¦]¬°­Ó¸ê¨¾½dªºÃö«Y¡A§Ú·Q­n¦b³øªí¤¤¡u©m¦W¡v¡B¡u¦a§}¡vÄæ¦ì±N«ü©wªº¦r¤¸¥H***¨ÓÁô½X¡CÁöµM¨Ï¥ÎReplaceªº¨ç¼Æ¥i¥H¹F¨ì®ÄªG¡A¥i¬O¦]¬°¥²¶·¦b³øªí¦b¥t¥[¤@­ÓÄæ¦ì¥h¨ú±o¡C
¬O§_¦³¿ìªk¨Ï¥ÎVBA¡A±N²{¦³ªºÄæ¦ì½d³ò°é¿ï«á¡A¨Ì·Ó«ü©wÅ޿襴¬P¸¹Áô½X©O?
ÁÂÁ¤j®a!

¦^´_ 1# coldedge

»Ý¨D

¬O§_¦³¿ìªk¨Ï¥ÎVBA¡A±N²{¦³ªºÄæ¦ì½d³ò°é¿ï«á¡A¨Ì·Ó«ü©wÅ޿襴¬P¸¹Áô½X©O?   

¦Û¤v¿ï½d³ò¡A¿ï§¹«á°õ¦æ¥¨¶°¡Aµ{¦¡¦p¤U

Sub test()
Application.ScreenUpdating = False
For Each rg In Selection
  If Len(rg) = 3 Then rg.Value = Left(rg, 1) & "*" & Right(rg, 1)
  If rg Like "*#*" Then For i = 0 To 9: rg.Value = Replace(rg, i, "*"): Next
Next
End Sub
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

¦^´_ 2# n7822123


    ÁÂÁ±z¡A¯u±oÀ°¤F§Ú¤@­Ó¤j¦£¡A¥Îµuµuªº»yªk´N¸Ñ¨M¤F§Ú¤j¤jªº°ÝÃD¡C·PÁÂ:)

TOP

¦^´_ 3# coldedge

¥i·f°t§Ö±¶Áä¡AÅý¨Ï¥Î¤W§ó¤è«K

µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

¦^´_ 4# n7822123


ÁÂÁ±z¡A³o¼Ë¾Þ§@°_¨Ó§ó§Ö¤F:D :D :D
¥t¥~¯à§_¦A½Ð±Ð¤@­Ó°ÝÃD? ¦]¬°§Úµo²{¦a§}¼Æ¦r­Y¬OÄÝ©ó¥þ§Îªº¦r¤¸¡A´N·|µLªk¥´¬P¸¹¡C¬O§_¦³¨ä¥Lªº¼gªk©O? ©Î¬O¦b¥´¬P¸¹¤§«e¡A¥i¦A¥[¤W¤@¬q»yªk§â«ü©w½d³òªº¦r¤¸¥Ñ¥þ§ÎÅܧ󬰥b§Î? ·PÁÂ!

TOP

A/BÄæ¦P®É¿ï¨ú

Sub test111()
With Selection
     For i = 0 To 9
         .Replace i, "*", Lookat:=xlPart
         .Replace StrConv(i, vbWide), "*"
     Next i
     For Each rg In .Columns(1).Cells
         If rg <> "" Then rg.Value = Application.Replace(rg, 2, 1, "*")
     Next
End With
End Sub


==============

TOP

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


    ÁÂÁª©¥DªºÀ°¦£¡A¥þ§Î¦r¤¸µLªk¥´¬P¸¹ªº°ÝÃD¤]¸Ñ¨M¤F¡AÁöµMVBA¤º¦³¨Ç»yªk¡A¥H§Ú¥Ø«eµ{«×ÁÙ¬O¬Ý¤£¤ÓÀ´¡A¦ý¬O§Ú·|¦b§ä®ÑÄy§V¤O¥h¬ã¨s¡C¯u±o«Ü·PÁ¤j®a:)

TOP

        ÀR«ä¦Û¦b : ¥Í®ð¡A´N¬O®³§O¤Hªº¹L¿ù¨ÓÃg»@¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD