- ©«¤l
- 254
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 310
- ÂI¦W
- 0
- §@·~¨t²Î
- W10
- ³nÅ骩¥»
- Excel 2016
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2019-6-16
- ³Ì«áµn¿ý
- 2024-9-23
|
¥»©«³Ì«á¥Ñ °a¤ªºµ ©ó 2021-1-24 18:56 ½s¿è
¦^´_ 1# stephenlee
°Ñ¦Ò¤F ·Ç¤jªº¼gªk ¶¶«K½m²ß ¦³ªÅªº¸Ü¤]¶¶«KÀ°§Ú¬Ý¬Ý ¬O§_¥¿±` ·PÁÂ- Public Sub ¸ê®Æ¤À©î½m²ß()
- Application.ScreenUpdating = False
- Arr = [A1].CurrentRegion
- Ar = [{900, "1,2", "3,4", "5"; 900, "1,2", "3,4","-"; 1800, "Support","-","-"}]
- Sheets.Add(After:=Sheets(1)).Name = "µ²ªG" & Format(Now, "-YYYY-MM-DD")
- For Y = 1 To UBound(Arr, 2): Cells(1, Y) = Arr(1, Y): Next Y
- For X = 1 To UBound(Ar)
- A = Int(Arr(2 + k, 4) / Ar(X, 1)) + 1
- C = Arr(2 + k, 4) - (A - 1) * Ar(X, 1)
- For i = 2 To UBound(Ar, 2)
- If Ar(X, i) <> "-" Then
- For Y = 1 To A
- If u < A Then u = u + 1
- E = IIf(u = A, C, Ar(X, 1))
- Cells(2 + G, 1) = Ar(X, i)
- Cells(2 + G, 2) = Arr(2 + k, 2)
- Cells(2 + G, 3) = Arr(2 + k, 3)
- Cells(2 + G, 4) = E
- Cells(2 + G, 5) = Arr(2 + k, 5)
- Cells(2 + G, 6) = Arr(2 + k, 6)
- G = G + 1
- Next Y
- End If
- u = 0
- Next i
- k = k + 1
- Next X
- Application.ScreenUpdating = True
- End Sub
½Æ»s¥N½X |
|