|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
- Private Sub Worksheet_Change(ByVal Target As Range)
- If Target.Count > 1 Then Exit Sub
- If Target.Column <> 2 Or Target.Row < 4 Then Exit Sub
- If Target = "" Then Exit Sub
- Dim Arr, i&, d, b$, s$, g$, aa$
- Set d = CreateObject("Scripting.Dictionary")
- Arr = [a1].CurrentRegion
- For i = 3 To UBound(Arr, 2)
- d(Arr(3, i)) = i
- Next
- b = Left(Target.Value, 1)
- s = Mid(Target.Value, 2, 1)
- g = Right(Target.Value, 1)
- aa = qiou(b) & qiou(s) & qiou(g)
- Cells(Target.Row, d(aa)) = aa
- End Sub
复制代码 |
|