|
请各位大大帮忙, 如何在
- Zone: F&B 以上的Team no, 在Float USD和FloatHKD自动填入5000,
- Zone:VIP以上的Team no,在Float USD自动填入20000, Float HKD是5000
- Zone:Others 以上的Team no,在Float USD自动填入1000, Float HKD是100
请问如何写个VBA, 谢谢
- Sub test()
- Dim s$, i&, arr
- s = "Others1000:100:Retail2500:2500:VIP20000:5000:F&B5000:5000"
- For i = Cells(Rows.Count, 2).End(3).Row To 2 Step -1
- If Not IsNumeric(Cells(i, 2)) Then
- arr = Split(Split(s, Trim(Mid(Cells(i, 2), 6)))(1), ":")
- ElseIf Cells(i, 2) <> "" Then
- Cells(i, 3).Resize(, 2) = arr
- End If
- Next i
- End Sub
复制代码
|
|