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

[µo°Ý] ·¸¦ì³B²z

[µo°Ý] ·¸¦ì³B²z

¥H¤U¬O¤j¤jªºµ{¦¡¡AÅܼÆa,b¬°¤p¼Æ(¨Ò¡G4.5¡B3.8)¡A°õ¦æµ²ªG¥X²{·¸¦ì°ÝÃD¡A½Ð¦U¦ì¤j¤jÀ°§Ú¬Ý¬Ý
sub ex()
Dim a As Single, b As Single, c As Single, d As Double
dim kkk as String
ccc = Chr(67)
ddd = Chr(68)
ggg = Chr(71)

For i = 3 To k                        
  xxx = i
  a = Range(ccc + xxx).Value
  b = Range(ddd + xxx).Value
  c = a + (a - b)
  d = c / a
  Range(ggg + xxx).Value = Format(d, "00.00")
Next

End sub
Ä_Ä_

¦^´_ 1# caichen3
For i = 3 To k                        
½Ð°Ý k ¬°¦h¤Ö¡H

TOP

1.¥ýµ¹k½á­È
2.§â+´«¦¨&

TOP

¦^´_ 1# caichen3
  1. Sub ex()
  2.     Dim a As Single, b As Single, c As Single, d As Double
  3.     Dim kkk As String
  4.     Dim k As Integer
  5.    
  6.     k = 3
  7.     ccc = Chr(67)
  8.     ddd = Chr(68)
  9.     ggg = Chr(71)

  10.     For i = 1 To k
  11.         a = Range(ccc & i).Value
  12.         b = Range(ddd & i).Value
  13.         c = a + (a - b)
  14.         d = c / a
  15.         Range(ggg & i).Value = Format(d, "00.00")
  16.     Next

  17. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2012-4-19 08:41 ½s¿è

¦^´_ 1# caichen3
°ÝÃD¦³´X­Ó³¡¤À
1)°j°éªºk­È¥¼«ü©w
2)Range»yªk¿ù»~
3)a,b«Å§i¬°³æºë·Ç¼Æ¡A­YÀx¦s®æ¼Æ­È¶W¥X³æºë·Ç¼Æ½d³ò(¥¦ªº½d³ò¦b­t¼Æªº®É­Ô¬O±q -3.402823E38 ¨ì -1.401298E-45¡A¦Ó¦b¥¿¼Æªº®É­Ô¬O±q 1.401298E-45 ¨ì 3.402823E38¡C)´N·|³y¦¨·¸¦ì
a = CSng(Range(ccc & xxx).Value)
b = CSng(Range(ddd & xxx).Value)
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 5# Hsieh
­ì¨Ó¯u¥¿°ÝÃD¬O¥X¦bÄæ¦ìÀx¦s­Èªººë·Ç«×ªº®e³\½d³ò¡C

3)a,b«Å§i¬°³æºë·Ç¼Æ¡A­YÀx¦s®æ¼Æ­È¶W¥X³æºë·Ç¼Æ½d³ò(¥¦ªº½d³ò¦b­t¼Æªº®É­Ô¬O±q -3.402823E38 ¨ì -1.401298E-45¡A¦Ó¦b¥¿¼Æªº®É­Ô¬O±q 1.401298E-45 ¨ì 3.402823E38¡C)´N·|³y¦¨·¸¦ì
a = CSng(Range(ccc & xxx).Value)
b = CSng(Range(ddd & xxx).Value)

ÁÂÁ¡I

TOP

¥»©«³Ì«á¥Ñ caichen3 ©ó 2012-4-19 13:25 ½s¿è

½Ð±Ð°ÝÃD
3)a,b«Å§i¬°³æºë·Ç¼Æ¡A­YÀx¦s®æ¼Æ­È¶W¥X³æºë·Ç¼Æ½d³ò(¥¦ªº½d³ò¦b­t¼Æªº®É­Ô¬O±q -3.402823E38 ¨ì -1.401298E-45¡A¦Ó¦b¥¿¼Æªº®É­Ô¬O±q 1.401298E-45 ¨ì 3.402823E38¡C)

¬°¤°»ò¤w¸g«Å§iDim a As Single, b As Single
«á­±ÁÙ­n¥[¤W
a = CSng(Range(ccc & xxx).Value)
b = CSng(Range(ddd & xxx).Value)

·PÁ¤j¤j­ÌªºÀ°§U¡A§Úª¾¹D¬°¤°»ò¤F:)
Ä_Ä_

TOP

¦b³Ð·s°Ó¾÷«ü¼ÆGÄ椤¦³­Y¤zªº¼Æ­È¡A§Ú·Q±q¤¤¿ï¥X2­Ó³Ì¤jªº¼Æ­È¨Ã¦³¬õ¦âºô©³¡C
¿ï¥X¨Óªº¼Æ­È©ñ¸m©órange(M1:M2), range("I1")=2¬O§Ú±N¿ï¥Xªº­Ó¼Æ¡C
¦pªG GÄ椤ªº¼Æ­Èµ¥©órange(M1:M2)´Nµ¹¤©¬õ¦âºô©³
¥H¤U¬O¬ÛÃöµ{¦¡½X¡G
sub ex()
Dim myrange As Range
Dim U As Range  
Dim zzz as string¡Asss as string
Dim w As Single
Dim q As Single
mmm = Chr(77)

Set myrange = Range("G3:G11" )            '³]©w½d³ò
w = Application.WorksheetFunction.Max(myrange)    '¨ú³Ì¤j¼Æ­È
Range("M1").Value = w

For Z = 2 To 2                                                                           '¨ú²Ä¤G¤j¼Æ­È         
zzz = Z
q = Application.WorksheetFunction.Large(myrange, Z)
Range(mmm & zzz).Value = Format(q, "00.00")
Next
                                    
With ActiveSheet
    For Each U In .Range("G3:G200")
           For s = 1 To 2
               sss = s
               If U = Range(mmm & sss).Value Then
                  U.Interior.ColorIndex = 3
               Else
                  U.Interior.ColorIndex = xlNone
               End If
           Next
    Next
End With
End sub
°õ¦æµ²ªG«o¥u¦³gÄ椤1.42ªº¼Æ­È©³¦â¬°¬õ¦â¡A1.5«o¨S¦³¡A¤@ª½§ä¤£¥X­ì¦]¡I¡I

ªí6-3.rar (56.51 KB)

Ä_Ä_

TOP

¦^´_ 8# caichen3

·Q±o¤Ó½ÆÂø¤F
  1. Private Sub CommandButton1_Click()
  2. Dim Ar(), A As Range, s&
  3. For Each A In Range([C3], [C3].End(xlDown))
  4. k = (A + (A - A.Offset(, 1))) / A
  5.   A.Offset(, 4) = k
  6.   ReDim Preserve Ar(s)
  7.   Ar(s) = k
  8.   s = s + 1
  9. Next
  10. For Each A In Range([G3], [G3].End(xlDown))
  11. If A > Application.Large(Ar, 3) Then
  12. A.Interior.ColorIndex = 3
  13. Else
  14. A.Interior.ColorIndex = xlNo
  15. End If
  16. Next
  17. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

½Ð±Ðh¤j¤j
k = (A + (A - A.Offset(, 1))) / A
  A.Offset(, 4) = k
  ReDim Preserve Ar(s)
  Ar(s) = k
  s = s + 1
Next
³o¬qµ{¦¡½X¬O¦b°µ¤°»ò©O¡H¡H
k = (A + (A - A.Offset(, 1))) / A   k­Èªº§@¥Î¬O¤°»ò
Ä_Ä_

TOP

        ÀR«ä¦Û¦b : °ß¨ä´L­«¦Û¤vªº¤H¡A¤~§ó«i©óÁY¤p¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD