- ©«¤l
- 13
- ¥DÃD
- 2
- ºëµØ
- 0
- ¿n¤À
- 15
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- office2016
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2018-8-12
- ³Ì«áµn¿ý
- 2018-10-11
|
¦^´_ PaulDing
§â²Ä¤@¦æ§ï¬°:¶Ã¼Æ¤ñ¨Ò½d³ò = rnd
¸ÑÄÀ:rnd=0~1
n7822123 µoªí©ó 2018-8-31 03:00
n¤j , §Úקï¤F«á¤À°t³£¨ìSKU10¥h¤F , ¬O§_§ÚÁÙ¦³þ¸Ì¨S¦³×§ï¦n©O? ·P®¦.
Sub Project1SFSKU1toSKU10_Click()
¶Ã¼Æ¤ñ¨Ò½d³ò = Rnd
RN = Sheets(14).UsedRange.Rows.Count
ReDim Sum(RN - 1)
For r = 1 To RN - 1
Sum(r) = Cells(r + 2, 2)
ave = Sum(r) / 10
For C = 1 To 9
Cells(r + 2, C + 2) = Fix(((Rnd * 2) - 1) * (ave * ¶Ã¼Æ¤ñ¨Ò½d³ò) + ave)
Next C
Cells(r + 2, 12) = "=sum(RC[-9]:RC[-1])"
Cells(r + 2, 12) = Sum(r) - Cells(r + 2, 12)
Next r
End Sub |
|