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

单¤¸®æ内¤£­«Î`¦r²Å

单¤¸®æ内¤£­«Î`¦r²Å

[ª©¥DºÞ²z¯d¨¥]
  • Hsieh(2010-7-10 17:49): ½ÐÀˬd¥N½X¥¿½T©Ê

Sub 单¤¸®æ内¤£­«Î`¦r²Å()
Set d = CreateObject("scripting.dictionary")
Set e = CreateObject("scripting.dictionary")
For i = 1 To Len(ActiveCell.Value)
d(Mid(ActiveCell.Value, i, 1)) = ""
Next
On Error Resume Next
For i = 1 To Len(ActiveCell.Value)
e.Add Mid(ActiveCell.Value, i, 1), ""
If Err.Number = 457 Then d.Remove (Mid(ActiveCell, i, 1))
Err.Clear
Next
MsgBox Join(d.keys, "")
End Sub
Sub 单¤¸®æ内¤£­«Î`¦r²Å()
For i = 1 To Len(ActiveCell.Value)
For a = 1 To Len(ActiveCell.Value)
If Mid(ActiveCell.Value, i, 1) = Mid(ActiveCell.Value, a, 1) Then m = m + 1
Next
If m = 1 Then mm = mm & Mid(ActiveCell.Value, i, 1)
m = 0
Next
MsgBox mm
End Sub
¥i¥H§ï为¦Û©w义¨ç数¡I
学习

¦^´_ 2# GBKEE
¤j¤j°Ý§A³á!!
¬°¤°»ò§ä¤£¨ì­«½Æ¡A¥Î¤U­±ªº¤èªk¥[¤J¦r¨å¸Ì¡A¬õ¦â¦a¤è¬Ý¤£À´¡A="" ¤£¬O¥Nªí¨S¦³ªF¦è¶Ü? ¬°¤°»òÅܦ¨¥[¤J¦r¨å?
d(Mid(ActiveCell.Value, i, 1)) = ""

TOP

这个¤èªk¤£错
学习

TOP

  1. Sub OnlyChar()
  2. For i = 1 To Len(ActiveCell.Value)
  3.   If Len(ActiveCell) - Len(Replace(ActiveCell, Mid(ActiveCell, i, 1), "")) = 1 Then mystr = mystr & Mid(ActiveCell, i, 1)
  4. Next
  5. MsgBox mystr
  6. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 3# wqfzqgk

­ì¨Ó¬O [¥h°£­«Î`ªº­È] «áÅã¥Ü¥X ¨S¦³­«½Æ¹Lªº¦r¤¸
¬O§Ú²Ä¤@²´ªºÆ[©À¬O¿ù»~  ¥h°£­«Î`ªº­È«á  Åã¥Ü¥X¥þ³¡ªºªº¦r¤¸

TOP

¬O¥h°£­«Î`ªº­È¡A¦p11223455¤]¥u¦³34²Å¦X
¬O这¤\个·N«ä
¨º个¦a¤è¤Ö¤F¤@个&
学习

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2010-7-10 17:51 ½s¿è

¦^´_ 1# wqfzqgk
½Ð°Ý  §A©Ò¤À¨Éªº  单¤¸®æ内¤£­«Î`¦r²Å µ{§Ç¤¤
¬°¦ó­n¨ì¤G ­Ó scripting.dictionary ª«¥ó
Set d = CreateObject("scripting.dictionary")
Set e = CreateObject("scripting.dictionary")
¨Ï¥Î¤@­Ó´N¨¬°÷ ¦p¤U
  1. Set d = CreateObject("scripting.dictionary")
  2. For i = 1 To Len(ActiveCell.Value)
  3. d(Mid(ActiveCell.Value, i, 1)) = ""
  4. Next
  5. MsgBox Join(d.keys, "")
½Æ»s¥N½X
§A¨Ï¥Î If Err.Number = 457 Then d.Remove (Mid(ActiveCell, i, 1))
·|¾É­P MsgBox Join(d.keys, "") ªº¤£¥¿½T

½Ð°Ý¦p¤U¤G­Ó°j°éªº¥Î·N ¥i¥H»¡©ú¤@¤U¸Ñ´b¶Ü?
  1. For i = 1 To Len(ActiveCell.Value)
  2. For a = 1 To Len(ActiveCell.Value)
  3. If Mid(ActiveCell.Value, i, 1) = Mid(ActiveCell.Value, a, 1) Then m = m + 1
  4. Next
  5. If m = 1 Then mm = mm Mid(ActiveCell.Value, i, 1) ³o¸Ì¦³¿ù»~
  6. m = 0
  7. Next
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¨Ã«D¦³¿ú¾{¬O§Ö¼Ö¡A°Ý¤ßµL·\¤ß³Ì¦w¡C
ªð¦^¦Cªí ¤W¤@¥DÃD