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

[µo°Ý] A1ªº­È­Y¬°"B"¡AB1¿é¤J¼Æ¦r«áªº­È©T©w¬°­t¼Æ

[µo°Ý] A1ªº­È­Y¬°"B"¡AB1¿é¤J¼Æ¦r«áªº­È©T©w¬°­t¼Æ

½Ð±Ð¦U¦ì°ª¤â¡A§Ú·Q­nÅýA1¿é¤J"B"¤§«á¡A«hB1¤£½×¿é¤J¥ô¦ó¼Æ¦r¡A¬Ò·|Åܬ°­t¼Æ
§Ú¥Î¤U¦C¤½¦¡¥h¸Õ
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
For Each BS In [a1:a10]
If BS.Value = "B" Then
BS.Offset(0, 1) = BS.Offset(0, 1) * -1
End If
Next
Application.EnableEvents = True
End Sub
¥i¬O³o¼Ëªº¸Ü¡A¥u­n¨ä¥L¦a¤è¦³§ó°Ê¡A
­ì¥»¬O­t¼Æªº­È¡A´N·|¦]¬°*-1¡A¤SÅܦ¨¥¿¼Æ¤F¡C
¦]¦¹·Q½Ð°Ý¸Ó«ç»ò­×§ï¡A¤~¯àÅý¥L¤@ª½«O«ù¬°­t¼Æ¡AÁÂÁÂ~~~

¦^´_ 1# owen06

Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Count <> 1 Then Exit Sub
    If Intersect([A1:A10], Target) Is Nothing Then Exit Sub
    Application.EnableEvents = False
    If Target.Value = "B" Then Target.Offset(0, 1).Value = -1 * Abs(Target.Offset(0, 1).Value)
    Application.EnableEvents = True
End Sub
[b]Kubi[/b]

TOP

OH~YEAH¡I¤Ó´Î¤F¡A§¹¥þok¡A·PÁÂKubi¤j~

TOP

        ÀR«ä¦Û¦b : ¤@­Ó¤H¤£©È¿ù¡A´N©È¤£§ï¹L¡A§ï¹L¨Ã¤£Ãø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD