|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Sub ZFCCX()
Dim rng As Range, SHT As Worksheet
Dim Str As String, zhys
Dim I As Integer, J, N, ARR
Dim T
Application.ScreenUpdating = False '//1رÕÆáĻˢDÂ
Application.DisplayAlerts = False '//1رÕÏμí3ìáê¾
Application.Calculation = xlManual
On Error Resume Next
T = Timer
'//¿aê¼ê±¼ä
Set SHT = ActiveWorkbook.ActiveSheet
ROWX = SHT.UsedRange.Rows.Count '''.CurrentRegionμ±Ç°Çøóò'''.UsedRangeòѾ-ê1óÃμÄÇøóò'''.Columns
ARR = SHT.Cells(1, 1).CurrentRegion '''UsedRange '''
For I = 2 To UBound(ARR)
N = 0
For J = 1 To VBA.Len(ARR(I, 1))
If InStr(1, ARR(I, 3), VBA.Mid(ARR(I, 1), J, 1)) > 0 Then N = N + 1
Next J
If Val(N) = Val(Len(ARR(I, 1))) Then ARR(I, 4) = ARR(I, 2) Else ARR(I, 4) = ""
Next I
SHT.Cells(1, 1).Resize(UBound(ARR), UBound(ARR, 2)) = ARR
MsgBox "2éÑˉíê±Ï!" & vbCrLf & "óÃê±£o" & Format(Timer - T, "#0.0000") & " Ãë", , "LKQSMXWóÑÇéìáê¾!!" '//ìáê¾ËùóÃê±¼ä
Application.ScreenUpdating = True '//»Ö¸′ÆáĻˢDÂ
Application.DisplayAlerts = True '//»Ö¸′Ïμí3ìáê¾
Application.Calculation = xlAutomatic
End Sub
|
|