½Ð±ÐÀx¦s®æ¤º®e¤ñ¸û»P¹Bºâ°ÝÃD(¤w¸Ñ¨M)
- ©«¤l
- 86
- ¥DÃD
- 30
- ºëµØ
- 0
- ¿n¤À
- 140
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- XP
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-2-19
- ³Ì«áµn¿ý
- 2020-8-26
|
½Ð±ÐÀx¦s®æ¤º®e¤ñ¸û»P¹Bºâ°ÝÃD(¤w¸Ñ¨M)
¥»©«³Ì«á¥Ñ jiuhtsair ©ó 2011-8-23 17:54 ½s¿è
§Ú¦³¤ÓÀx¦s®æ¤À§O¬OA1,B1,C1,D1,E1,F1,G1¡C¦pªGA1¤p©ó©Îµ¥©óB1«h±NC1ªº¤º®e»PD1ªº¤º®e¬Û¥[©ñ¤JD1¡A§_«h«K±NC1ªº¤º®e»PE1ªº¤º®e¬Û¥[©ñ¤JE1¡C
§Ú¼gªºµ{¦¡½X¦p¤U¡A¥i¬O¨S¦³§@¥Î¡A½Ð¤j¤jÌÀ°§Ú¬Ý¬Ýþ¸Ì¿ù¤F¡IÁÂÁ¡I
X = Sheets(1).Cells(1, 1) 'A1¤º®e
Y = Sheets(1).Cells(1, 2) 'B1¤º®e
Z = Sheets(1).Cells(1, 3) 'C1¤º®e
If X <= Y Then Sheets(1).Cells(1, 4) = Z Else Sheets(1).Cells(1, 5) = Z '¦pªGA1<=B1«hD1=C1 §_«h E1=C1
Sheets(1).Cells(1, 6) = bid_t1 'bid_t1=D1
Sheets(1).Cells(1, 7) = ask_t1 'ask_t1=E1
If X <= Y Then bid_t1 = bid_t1 + Z Else ask_t1 = ask_t1 + Z '¦pªGA1<=B1«hC1 +D1©ñ¤JD1§_«h C1+E1©ñ¤JE1 |
|
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X
|
|
|
|
|
- ©«¤l
- 86
- ¥DÃD
- 30
- ºëµØ
- 0
- ¿n¤À
- 140
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- XP
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-2-19
- ³Ì«áµn¿ý
- 2020-8-26
|
ÁÂÁ¤j¤j¶O¤ß¸Ñµª¡I³oӸѵª¹ï§Ú¦³¨ÇÃø¥H²z¸Ñ¡C§Ú¥ý¬ã¨sWorksheet_Calculate©MChange¨Æ¥ó¡Aµ¥¦³©Ò¤F¸Ñ¦A¨Ó½Ð±Ð...ÁÂÁ¡I |
|
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X
|
|
|
|
|
- ©«¤l
- 86
- ¥DÃD
- 30
- ºëµØ
- 0
- ¿n¤À
- 140
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- XP
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-2-19
- ³Ì«áµn¿ý
- 2020-8-26
|
§Úµo²{¦Û¤v¤Ö¥´¤Fend if¡A¥[¤J«á¡Aµ{¦¡¦p¤U¡G
Private Sub Worksheet_Calculate()
On Error Resume Next
C1 = Sheets(1).Cells(1, 1) 'A1
B1 = Sheets(1).Cells(1, 2) 'B1
S1 = Sheets(1).Cells(1, 3) 'C1
bid_s1 = Sheets(1).Cells(1, 4) 'D1
bid_t1 = Sheets(1).Cells(1, 5) 'F1
ask_s1 = Sheets(1).Cells(1, 6) 'E1
ask_t1 = Sheets(1).Cells(1, 7) 'G!
If [C1] <= [B1] Then
[bid_s1] = [S1].Value: [bid_t1] = [bid_t1] + [S1]
Else
[bid_s1] = [S1].Value: [bid_t1] = [bid_t1] + [S1]
End If
End Sub
¦ý¬Oµ²ªG¤´¬O¤@¼Ë...D1,E1,F1,G1³£¨S¦³¼Æ¦r¥X²{.... |
|
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X
|
|
|
|
|
- ©«¤l
- 86
- ¥DÃD
- 30
- ºëµØ
- 0
- ¿n¤À
- 140
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- XP
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-2-19
- ³Ì«áµn¿ý
- 2020-8-26
|
§Ú§âµ{¦¡¿é¤J¡A¦P®É¿é¤JA1,B1,C1¤TÓÀx¦s®æ¼ÆÈ¡A°õ¦æ«á¨S¦³§i¶D§Ú¥ô¦ó¿ù»~..¦³°õ¦æ If ...Then...Elseªº§PÂ_¦¡..¦ý¬OD1,E1,F1,G1³£¨S¦³¥ô¦ó°Ê§@¡A.·Q½Ð±Ðn¦p¦óקï?ÁÂÁ¡I
Private Sub Worksheet_Calculate()
On Error Resume Next
C1 = Sheets(1).Cells(1, 1) 'A1
B1 = Sheets(1).Cells(1, 2) 'B1
S1 = Sheets(1).Cells(1, 3) 'C1
bid_s1 = Sheets(1).Cells(1, 4) 'D1
bid_t1 = Sheets(1).Cells(1, 5) 'F1
ask_s1 = Sheets(1).Cells(1, 6) 'E1
ask_t1 = Sheets(1).Cells(1, 7) 'G!
If [C1] <= [B1] Then [bid_s1] = [S1].Value: [bid_t1] = [bid_t1] + [S1] Else [ask_s1] = [S1].Value: [ask_t1] = [ask_t1] + [S1]
End Sub |
|
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X
|
|
|
|
|
- ©«¤l
- 86
- ¥DÃD
- 30
- ºëµØ
- 0
- ¿n¤À
- 140
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- XP
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-2-19
- ³Ì«áµn¿ý
- 2020-8-26
|
©êºp¡I³¯z¦³©Ò¿ù»~¡A«·s³¯z¡G
§Ú¦³¤CÓÀx¦s®æ¤À§O¬OA1,B1,C1,D1,E1,F1,G1¡C¦pªGA1¤p©ó©Îµ¥©óB1«h±NC1ªº¤º®e©ñ¤JD1¡A¦P®É±NC1ªº¤º®e»PD1ªº¤º®e¬Û¥[©ñ¤JF1¡A§_«h«K±NC1ªº¤º®e»PE1ªº¤º®e¬Û¥[©ñ©ñ¤JG1¡C
§Ú¼gªºµ{¦¡½X¦p¤U¡A¥i¬O¨S¦³§@¥Î¡A½Ð¤j¤jÌÀ°§Ú¬Ý¬Ýþ¸Ì¿ù¤F¡IÁÂÁ¡I
X = Sheets(1).Cells(1, 1) 'A1¤º®e
Y = Sheets(1).Cells(1, 2) 'B1¤º®e
Z = Sheets(1).Cells(1, 3) 'C1¤º®e
If X <= Y Then Sheets(1).Cells(1, 4) = Z Else Sheets(1).Cells(1, 5) = Z '¦pªGA1<=B1«hD1=C1 §_«h E1=C1
Sheets(1).Cells(1, 6) = bid_t1 'bid_t1=F1
Sheets(1).Cells(1, 7) = ask_t1 'ask_t1=G1
If X <= Y Then bid_t1 = bid_t1 + Z Else ask_t1 = ask_t1 + Z '¦pªGA1<=B1«hC1 +D1©ñ¤JF1§_«h C1+E1©ñ¤JG1 |
|
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X
|
|
|
|
|