ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ¿é¤J¬Y°Ï°ì,·|¸õ¥X´£¥Ü±Þ­±?

[µo°Ý] ¿é¤J¬Y°Ï°ì,·|¸õ¥X´£¥Ü±Þ­±?

¾Ç©f¤S¨Ó³Â·Ð¤j®a¤F

¥´¶} EXCEL Àɦ³¸Ô²Ó»¡©ú³á

½Ð«Ó­ô/¬ü¤kª©¥D «Ó­ô/¬ü¤k¾Çªø¸ò¾Ç©j

À°¦£¾Ç©f§¹¦¨

Book2.rar (4.22 KB)

¦^´_ 1# metrostar
  1. Private Sub Worksheet_Change(ByVal Target As Range)
  2. If Intersect(Target, [D3:D8]) Is Nothing Or Target.Count <> 1 Then Exit Sub
  3. If Application.Sum([D3:D8]) < 510 Then msg = "¼Æ­ÈÁ`©M®t " & 510 - Application.Sum([D3:D8])
  4. If Target Mod 1 <> 0 Then msg = "¥u¯à¿é¤J¾ã¼Æ": fs = True
  5. If Application.Sum([D3:D8]) > 510 Then msg = "¼Æ­È³Ì¤j¥u¯à¿é¤J " & 510 - Application.Sum([D3:D8]) + Target: fs = True
  6. If Target < 0 Or Target > 255 Then msg = "¼Æ­È¥u¯à¤¶©ó0~255": fs = True
  7. If msg <> "" Then MsgBox msg
  8. If fs = True Then Target.Select
  9. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¤Ó´Î¤F,¥i¥H¤F (·P®¦)
¦hÁ³o¦ì«Ó­ô¶W¯Åª©¥D
¾Ç©f«D±`·P°Ê©O
±z¯u¬O¤Ó±j¤Ó±j¤F
·PÁ±z¨Ã¯¬¶P±z
©¯ºÖ¦n¹B¥Ã»·­°Á{±z¨­¤W

TOP

        ÀR«ä¦Û¦b : ¬Ý§O¤H¤£¶¶²´¡A¬O¦Û¤v­×¾i¤£°÷¡C
ªð¦^¦Cªí ¤W¤@¥DÃD