- ©«¤l
- 6
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 13
- ÂI¦W
- 0
- §@·~¨t²Î
- windows10
- ³nÅ骩¥»
- Excel2007
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2017-4-24
- ³Ì«áµn¿ý
- 2017-8-2
|
[µo°Ý] ½Ð°Ý¡G¦p¦ó±N§PÂ_¥X¨Óªº¼ÆȨ̧ǽƻs¤J¤À¶ªº«ü©w®æ¤¤
¤p§Ì¬Oªì¤ßªÌ¡A¦Û¾ÇVBA·Q¥Î¨Ó¤ÀªR¦Û¤vªº§ë¸ê¸ê®Æ¡Aªþ¥ó¬°§ÚExcelªºªí®æ¤Îµ{¦¡ºI¹Ï¡A¥Ø«eºc·Q¬O¡G
«O¥»(EÄæ)¡BMÈ(KÄæ)¡A§Ú¥ý¥Îµ{¦¡¤U¥h¶]³o¨âÓÄæ¦ìªº¼ÆÈ¡AµM«áDÄ楻¨´N¦³¤½¦¡¡A·|¦]¬°«O¥»¸òMªº¼ÆȲզX¡A¶i¦æpºâ¡A¥unD2¦ÜD245¥þ³¡³£¬O¥¿¼Æ¡A´N±N¥i¥Hpºâ¥X¥¿¼Æªº«O¥»©MMȲ¾°Ê¨ì¤À¶
¨Ò¦p¡G«O¥» = 1 ¡B MÈ = 1¡B(D2:D245) ¨ä¤¤¦³Äæ¦ì¬OtÈ¡A
«O¥» = 1¡B MÈ = 2¡B(D2:D245) ¥þ³¡Äæ¦ì¬O¥¿¼Æ¡A±N«O¥»1¤ÎMÈ2¡A½Æ»s¨ì¤À¶Àx¦s°_¨Ó¡C
¥Ø«e¬°¤î¡A¤Wz¥\¯à¬Ò¤j¦h¤w¦Û¦æ§¹¦¨¡C
¦ý¥d¦b¹Ï3ªº³¡¤À¡A¦]¬°°j°éªºÃö«Y¡A½Æ»s¨ì¤À¶ªº¼ÆÈ¡A³£·|«½ÆªºÂл\¦b¦P¤@ÓÄæ¦ì¸Ì±¡A¨S¿ìªk±N¥¿½Tªº¸ê®Æ¨Ì§Ç¶ñ¤J¡C
³o¬O°j°éµ{¦¡ªº³¡¤À- '¼ÆȤÀªR°j°é
- For i = 1 To 10 '¶i¤J«O¥»°j°é
- Range("E2:E245") = i & "%"
-
- For a = 1 To 5 '¶i¤JMÈ°j°é
- Range("K2:K245") = a
-
-
- For s = 1 To 245 '¶i¤J§PÂ_¦¡°j°é
- If Cells(s + 1, 4) > 1 Then '¶i¤JIf§PÂ_¦¡
- s = s + 1
- ElseIf s = 245 Then
- Sheets("·JÁ`ªí").Cells(2, 1) = Sheets("´ú¸Õ¥Î¬¡¶").Cells(2, 5)
- Sheets("·JÁ`ªí").Cells(2, 2) = Sheets("´ú¸Õ¥Î¬¡¶").Cells(2, 11)
- ElseIf Cells(s + 1, 4) < 1 Then
- Exit For ' ¤¤Â_°j°é
- End If
-
- Next s
- Next a
- Next i
½Æ»s¥N½X |
-
-
001.png
(171.07 KB)
|