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

¤GÄæ¦ìªº³Ì«á­Èªº®t­È

¤GÄæ¦ìªº³Ì«á­Èªº®t­È

¥»©«³Ì«á¥Ñ ziv976688 ©ó 2017-4-30 11:22 ½s¿è

°²³]:
AÄ榳ªÅ®æ©M¤å¦r©M¼Æ­È
BÄ榳ªÅ®æ©M¤å¦r©M¼Æ­È

½Ð°Ý:¤U¦Cµ{¦¡½Xªº¥¿½T»yªk
i = AÄ檺³Ì«á¤@­Ó¼Æ­È - BÄ檺³Ì«á¤@­Ó¼Æ­È

¨D¸Ñ~ÁÂÁÂ!

¦^´_ 8# ¸­°ê¬w
·PÁ±zªº«ü¾É©M¨ó§U~°ÝÃD¸Ñ¨M¤F~·P®¦

TOP

  1. Sub diffab()
  2.     k = WorksheetFunction.Max(Columns(1)) - WorksheetFunction.Max(Columns(2))
  3.     Cells(k, 5).Interior.ColorIndex = 6
  4. End Sub
½Æ»s¥N½X
¦^´_ 7# ziv976688

TOP

°ÝÃD¾ã²z~
Sub diffab()
   
   
[D1] = "=MAX(A:A)-MAX(B:B)"
    [D1] = [D1].Value
    Cells([D1], 5).Interior.ColorIndex = 6

End Sub

¦pªG¤£¥Î»²§UÀx¦s®æD1¡A¥H±`¼Æk´À¥N¡A½Ð°Ý»yªk­n¦p¦ó§ï?
ÁÂÁÂ!

TOP

¥»©«³Ì«á¥Ñ ziv976688 ©ó 2017-5-1 15:17 ½s¿è

¤GÄæ¦ìªº³Ì¤j­Èªº®t­È

¸Õ¹L
If k = "=MAX(A:A)-MAX(B:B)" Then
    k = k.Value
    Cells("E" & k, 1).Interior.ColorIndex = 6
End If
¦ý¨S¦³¤ÏÀ³

TOP

¦^´_ 4# ¸­°ê¬w
ÁÂÁ±zªº¼ö¤ßÀ°¦£©M«ü¾É

TEST.rar (6.42 KB)
¥i§_¦A½Ð±Ð:
     k = "=MAX(A:A)-MAX(B:B)"
    Cells("E" & k, 1).Interior.ColorIndex = 6

½Ð°Ý:¦p¦ó±NKªº¤½¦¡»yªk§ï¦¨¤@¯ëµ{¦¡ªº»yªk¥B¯àÂন¼Æ­È?


PS¡JAÄæ³Ì¤jªº¼Æ­È¤@©w¤j©óBÄæ³Ì¤jªº¼Æ­È


ÁÂÁ±z


TOP

  1. Sub diffab()
  2. For i = [a65536].End(xlUp).Row To 1 Step -1
  3.    If IsNumeric(Cells(i, 1)) And Cells(i, 1) <> "" Then
  4.       a = Cells(i, 1)
  5.       Exit For
  6.    End If
  7. Next i
  8. For i = [b65536].End(xlUp).Row To 1 Step -1
  9.    If IsNumeric(Cells(i, 2)) And Cells(i, 2) <> "" Then
  10.       b = Cells(i, 2)
  11.       Exit For
  12.    End If
  13. Next i
  14. MsgBox a - b
  15. End Sub
½Æ»s¥N½X
¦^´_ 1# ziv976688

TOP

hcm19522¤j¤j:
·PÁ±zªº¼ö¤ß½ç±Ð¡C

¦ý§Ú»Ý­nªº¬OVBAµ{¦¡»yªk^^"

TOP

http://blog.xuite.net/hcm19522/twblog/502962837
google"EXCEL°g"  blog  ©Îgoogleºô§}:https://hcm19522.blogspot.com/

TOP

        ÀR«ä¦Û¦b : ¤@­Ó¯Ê¤fªºªM¤l¡A¦pªG´«¤@­Ó¨¤«×¬Ý¥¦¡A¥¦¤´µM¬O¶êªº¡C
ªð¦^¦Cªí ¤W¤@¥DÃD