|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
参与一下。。。
- Sub ykcbf() '//2024.6.12
- r = Cells(Rows.Count, 1).End(3).Row
- arr = [a1].Resize(r, 2)
- ReDim brr(1 To UBound(arr), 1 To 2)
- For i = 2 To UBound(arr)
- m = m + 1
- st = Split(arr(i, 1), "*")
- s = st(UBound(st))
- ss = Replace(arr(i, 2), "Φ", "φ")
- k = Val(ss)
- If k = 0 Then
- If InStr(ss, "φ") Then
- k = Val(Mid(ss, InStr(ss, "φ") + 1))
- Else
- k = Val(Mid(ss, 8))
- End If
- End If
- If k > 10 Then
- brr(m, 1) = "螺纹钢"
- Else
- If InStr(s, "螺") Then
- brr(m, 1) = "盘螺"
- Else
- brr(m, 1) = "线材"
- End If
- End If
- brr(m, 2) = k
- Next
- [d2:e10000] = ""
- [d2].Resize(m, 2) = brr
- MsgBox "OK!"
- End Sub
复制代码
|
评分
-
1
查看全部评分
-
|