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

vba½G¨­,·P®¦

vba½G¨­,·P®¦

Private Sub CommandButton1_Click()
Sheets("¤u§@ªí3").Select
Label25 = [B7]
'Sheets("¤u§@ªí3").Select
If [J11] = 1 Then
    OptionButton1 = False
    OptionButton2 = False
    OptionButton3 = False
    OptionButton4 = True
ElseIf [I11] = 1 Then
   OptionButton1 = False
    OptionButton2 = False
    OptionButton3 = True
    OptionButton4 = False
ElseIf [H11] = 1 Then
     OptionButton1 = False
    OptionButton2 = True
    OptionButton3 = False
    OptionButton4 = False
ElseIf [G11] = 1 Then
   
    OptionButton1 = True
    OptionButton2 = False
    OptionButton3 = False
    OptionButton4 = False
End If

Sheets("¤u§@ªí1").Select

TextBox4 = Round(TextBox1 * 3.3, 0)
Me.TextBox4 = Format(TextBox4, "#,###.##")
TextBox5 = Round(TextBox2 * 3.3, 0)
Me.TextBox5 = Format(TextBox5, "#,###.##")
If TextBox6 < 0 Then
TextBox6 = 0
Else
TextBox6 = Round(TextBox4 / TextBox5, 2)
Me.TextBox6 = Format(TextBox6, "#,###.##")
End If


Private Sub TextBox15_Change()
    Sheets("¤u§@ªí3").Select
    [C3] = TextBox15
    Sheets("¤u§@ªí1").Select
      
   
End Sub

Private Sub TextBox16_Change()
Sheets("¤u§@ªí3").Select
[C4] = TextBox16
Sheets("¤u§@ªí1").Select
End Sub

Private Sub TextBox17_Change()
Sheets("¤u§@ªí3").Select
    [C5] = TextBox17
Sheets("¤u§@ªí1").Select
End Sub

¦^´_ 1# sillykin
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Private Sub CommandButton1_Click()
  3.     With Sheets("¤u§@ªí3")  '¤£¥²Select¨ÓSelect¥h
  4.         OptionButton4 = .[J11] = 1
  5.         OptionButton3 = .[I11] = 1
  6.         OptionButton2 = .[H11] = 1
  7.         OptionButton1 = .[G11] = 1
  8.     End With
  9. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 2# GBKEE


    ÁÂÁ¤j¤jªº¦^ÂÐ,·Pı¦nµu...
¤£¦n·N«ä¦b½Ð±ÐPrivate Sub TextBox16_Change()
Sheets("¤u§@ªí3").Select
[C4] = TextBox16
Sheets("¤u§@ªí1").Select
End Sub

Private Sub TextBox17_Change()
Sheets("¤u§@ªí3").Select
    [C5] = TextBox17
Sheets("¤u§@ªí1").Select
End Sub
¤W­z¨S§ó¦nªº¤èªk¶Ü¡H¡H¡H

TOP

¦^´_ 3# sillykin
¦P¼Ëªº¤£¥²Select¨ÓSelect¥h¡A¸Õ¬Ý¬Ý¡C
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

ÁÂÁ¤j¤jªº«ü¾É¡A·P®¦

TOP

¦^´_ 5# sillykin

¤j¤j¤£¦n·N«ä..¦b½Ð±Ð¤@¤U
Private Sub CommandButton3_Click()
Dim t As Integer, v1 As Integer

For t = 1 To 17


Range("C" & t + 3).Value = FormatNumber(Round(Range("A" & t + 3).Value * 3.3, 1))
Range("D" & t + 3).Value = FormatNumber(Round(Range("B" & t + 3).Value * 3.3, 1))
If Range("D" & t + 3) <> 0 Then
  Range("E" & t + 3) = FormatNumber(Round(Range("C" & t + 3) / Range("D" & t + 3), 2))
  Else
  Range("E" & t + 3).Value = ""
  End If
  
'================================================================================
   '20¦~¥H¤U
    If Range("A" & t + 3) = "" Then
        Range(("C" & t + 3), ("E" & t + 3)) = ""
      
        Exit Sub
    End If
   
    If (Range("E" & t + 3) > 3) Then
         Range("F" & t + 3) = FormatNumber(Round((Range("C" & t + 3) * 0.4) - (Range("D" & t + 3) * 0.7), 0))
         
    ElseIf (Range("E" & t + 3) > 2) Then
   
         Range("F" & t + 3) = FormatNumber(Round((Range("C" & t + 3) * 0.3) - (Range("D" & t + 3) * 0.4), 0))
        
    ElseIf (Range("E" & t + 3) > 1) Then
   
         Range("F" & t + 3) = FormatNumber(Round((Range("C" & t + 3) - Range("D" & t + 3)) * 0.2, 0))
        
    ElseIf (Range("E" & t + 3) <= 1) Then
         Range("F" & t + 3) = 0
    End If
   
   
'================================================================================
   '¹O20~30¦~
    If Range("A" & t + 3) = "" Then
         Range(("C" & t + 3), ("E" & t + 3)) = ""
        Exit Sub
    End If
   
    If (Range("E" & t + 3) > 3) Then
         Range("G" & t + 3) = FormatNumber(Round((Range("C" & t + 3) * 0.36) - (Range("D" & t + 3) * 0.6), 0))
         
    ElseIf (Range("E" & t + 3) > 2) Then
   
         Range("G" & t + 3) = FormatNumber(Round((Range("C" & t + 3) * 0.28) - (Range("D" & t + 3) * 0.36), 0))
        
    ElseIf (Range("E" & t + 3) > 1) Then
   
         Range("G" & t + 3) = FormatNumber(Round((Range("C" & t + 3) - Range("D" & t + 3)) * 0.2, 0))
        
     ElseIf (Range("E" & t + 3) <= 1) Then
         Range("G" & t + 3) = 0
    End If
  
'================================================================================
   '¹O30~40¦~
    If Range("A" & t + 3) = "" Then
        Range(("C" & t + 3), ("E" & t + 3)) = ""
        Exit Sub
    End If
   
    If (Range("E" & t + 3) > 3) Then
         Range("H" & t + 3) = FormatNumber(Round((Range("C" & t + 3) * 0.34) - (Range("D" & t + 3) * 0.55), 0))
         
    ElseIf (Range("E" & t + 3) > 2) Then
   
         Range("H" & t + 3) = FormatNumber(Round((Range("C" & t + 3) * 0.27) - (Range("D" & t + 3) * 0.34), 0))
        
    ElseIf (Range("E" & t + 3) > 1) Then
   
         Range("H" & t + 3) = FormatNumber(Round((Range("C" & t + 3) - Range("D" & t + 3)) * 0.2, 0))
        
     ElseIf (Range("E" & t + 3) <= 1) Then
         Range("H" & t + 3) = 0
    End If
'================================================================================
   '¹O40¦~¥H¤W
    If Range("A" & t + 3) = "" Then
         Range(("C" & t + 3), ("E" & t + 3)) = ""
        Exit Sub
    End If
   
    If (Range("E" & t + 3) > 3) Then
         Range("I" & t + 3) = FormatNumber(Round((Range("C" & t + 3) * 0.32) - (Range("D" & t + 3) * 0.5), 0))
         
    ElseIf (Range("E" & t + 3) > 2) Then
   
         Range("I" & t + 3) = FormatNumber(Round((Range("C" & t + 3) * 0.26) - (Range("D" & t + 3) * 0.32), 0))
        
    ElseIf (Range("E" & t + 3) > 1) Then
   
         Range("I" & t + 3) = FormatNumber(Round((Range("C" & t + 3) - Range("D" & t + 3)) * 0.2, 0))
        
     ElseIf (Range("E" & t + 3) <= 1) Then
         Range("I" & t + 3) = 0
    End If
   
   
'================================================================================
   '¼W­Èµ|Á`­p
    If Range("J" & t + 3) = "" Then
         Range(("K" & t + 3)) = ""
        Else
         Range("K" & t + 3) = FormatNumber(Round((Range("F" & t + 3)) * (Range("J" & t + 3)), 1))
         Range("L" & t + 3) = FormatNumber(Round((Range("G" & t + 3)) * (Range("J" & t + 3)), 1))
         Range("M" & t + 3) = FormatNumber(Round((Range("H" & t + 3)) * (Range("J" & t + 3)), 1))
         Range("N" & t + 3) = FormatNumber(Round((Range("I" & t + 3)) * (Range("J" & t + 3)), 1))
         
    End If
   
Next

End Sub
¬°¦ó¦b
A4Àx¦s®æ¿é¤J181,000
B4Àx¦s®æ¿é¤J140,625
--------------------
C4Àx¦s®æµª®×¬°597,300
D4Àx¦s®æµª®×¬°464,062¡]¥¿½T¬°464,063¡^
F4Àx¦s®æµª®×¬°26,648¡]¥¿½T¬°26,647¡^
¤£ª¾­n¦p¦ó³B¸m¡A¦³°ª¤â¨ó§U¶Ü¡H¡H¡H

TOP

¦pªG¥Î¤U­±¨ç¼Æ­pºâ
=TEXT(B1*3.3,"#,###")
vba­n¦p¦ó¤U©O???

TOP

¥»©«³Ì«á¥Ñ Joforn ©ó 2015-9-10 12:42 ½s¿è

¦^´_ 7# sillykin
Format$([B1] * 0.33, "#,##0")¡@'这个会«O¯d0¡A¤£«O¯d0ªº话§ï¦¨Format$([B1] * 0.33, "#,###")

TOP

¦^´_ 7# sillykin
¤]¥i¥H¨Ï¥Î¤U­±ªº¡G
FormatNumber([B3], 0)

TOP

¦^´_ 9# Joforn


    ÁÂÁ¤j¤j¤§¦^ÂÐ,¦ýÁÙ¬O¥|±Ë¤­¤J¦]¯À,³y¦¨­pºâ¤§»È»~,

TOP

        ÀR«ä¦Û¦b : ¨Ã«D¦³¿ú¾{¬O§Ö¼Ö¡A°Ý¤ßµL·\¤ß³Ì¦w¡C
ªð¦^¦Cªí ¤W¤@¥DÃD