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

[µo°Ý] ¦p¦ó¨Ï¥Î³æ¤@¿z¿ï©Ô¦h­«¸ê®Æ???¦p¹Ï

[µo°Ý] ¦p¦ó¨Ï¥Î³æ¤@¿z¿ï©Ô¦h­«¸ê®Æ???¦p¹Ï

¥»©«³Ì«á¥Ñ keovin790916 ©ó 2016-7-19 13:56 ½s¿è

½Ð±Ð¦p¦ó

¦pÀɮ׳o­Ó




´ú¸Õª©¤@.rar (23.46 KB)

¦^´_ 1# keovin790916
§Aªº¹CÀ¸³W«h¡A½Ð»¡©ú­n¿z¿ï¡H

TOP

¦^´_ 2# c_c_lai


    ¦pÀɮתº ¿é¤J¥N¸¹«á ¯àª½±µ¿z¿ï ¸ê®Æ (¥¼§¹¦¨)¤u§@­¶¬O©|¥¼§¹¦¨ªº   ¸ò§¹¦¨«á

TOP

¦^´_ 3# keovin790916

´ú¸Õª©¤@.rar (41.75 KB)

TOP

¦^´_ 4# c_c_lai


    ¤j¤j¬O¼F®`


¬Ý¨Ó§Ú­n²z¸Ñ¤@¤U³o­Ó¤F

Sub Ex()
    Dim rng As Range, ctn As Range
    Dim typ As String, amt As Double
   
    [A23:F35].Clear
    typ = "": amt = 0
    [E36:E43] = 0
    Set ctn = [A23]
    For Each rng In Range("C3", [C3].End(xlDown))
        If rng = [C20] Then
            If typ = "" Then typ = rng.Offset(, 1)
            ctn = rng.Offset(, -2)             '  ¤é´Á
            ctn.Offset(, 1) = rng.Offset(, 3)  '  «~¦W
            ctn.Offset(, 2) = rng.Offset(, 5)  '  ¥ó¼Æ
            ctn.Offset(, 3) = rng.Offset(, 6)  '  ­«¶q
            ctn.Offset(, 4) = rng.Offset(, 7)  '  ³æ»ù
            ctn.Offset(, 5) = rng.Offset(, 8)  '  ª÷ÃB
            amt = amt + ctn.Offset(, 5).Value
            Set ctn = ctn.Offset(1)
        End If
    Next
    [E36] = amt
    [E37] = amt * IIf(typ = "Q", [J24].Value, [J25].Value)
    [E38] = amt * IIf(typ = "Q", [J27].Value, [J28].Value)
    [E39] = amt * IIf(typ = "Q", [J32].Value, [J33].Value)
    [E42] = amt * IIf(typ = "Q", [J36].Value, [J37].Value)
    [E43] = amt - [E37].Value - [E38].Value - [E39].Value - [E42].Value
End Sub

TOP

½Ð°Ý¤j¤j  ¦p¦ó¥[¤J¥|±Ë¤­¤J Int(X + 0.5)??

TOP

¦^´_ 6# keovin790916
  1. Sub Ex()
  2.     Dim MyDouble As Double, MyInt As Integer
  3.    
  4.     MyDouble = 2345.4678 ' MyDouble ¬OÂùºë·Ç¼Æ¡C
  5.     MyInt = CInt(MyDouble) ' MyInt ªº­È¬°2345¡C
  6.     MsgBox MyDouble & " =" & vbCrLf & MyInt
  7. End Sub
½Æ»s¥N½X

TOP

Sub Ex()
    Dim rng As Range, ctn As Range
    Dim typ As String, amt As Double
   
    [A23:F35].Clear
    typ = "": amt = 0
    [E53:E60] = 0
    Set ctn = [A23]
    For Each rng In Range("C3", [C3].End(xlDown))
        If rng = [C20] Then
            If typ = "" Then typ = rng.Offset(, 1)
            ctn = rng.Offset(, -2)             '  ¤é´Á
            ctn.Offset(, 1) = rng.Offset(, 3)  '  «~¦W
            ctn.Offset(, 2) = rng.Offset(, 5)  '  ¥ó¼Æ
            ctn.Offset(, 3) = rng.Offset(, 6)  '  ­«¶q
            ctn.Offset(, 4) = rng.Offset(, 7)  '  ³æ»ù
            ctn.Offset(, 5) = rng.Offset(, 8)  '  ª÷ÃB
            amt = amt + ctn.Offset(, 5).Value
            Set ctn = ctn.Offset(1)
        End If
    Next
    [E53] = amt
   
    [E54] = amt * IIf(typ = "½­µæ", [J24].Value, [J25].Value)
    [E55] = amt * IIf(typ = "½­µæ", [J27].Value, [J28].Value)
    [E56] = amt * IIf(typ = "½­µæ", [J32].Value, [J33].Value)
    [E59] = amt * IIf(typ = "½­µæ", [J36].Value, [J37].Value)
   
    [E54] = WorksheetFunction.Round([E54], 0)  '¥|±Ë¤­¤J
    [E55] = WorksheetFunction.Round([E55], 0)
    [E56] = WorksheetFunction.Round([E56], 0)
    [E59] = WorksheetFunction.Round([E59], 0)
   
    [E60] = amt - [E54].Value - [E55].Value - [E56].Value - [E59].Value
   
End Sub

½Ð°Ý¦pªG­n§ï¤u§@­¶1 ¨º«ç»ò¼g?

TOP

        ÀR«ä¦Û¦b : µoµÊ®ð¬Oµu¼ÈªºµoºÆ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD