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

½Ð°Ý¤@­Ó»yªk°ÝÃD For I = 1 To Range("§ó·s·s·s").Cells.Count

½Ð°Ý¤@­Ó»yªk°ÝÃD For I = 1 To Range("§ó·s·s·s").Cells.Count

¥»©«³Ì«á¥Ñ m09903020 ©ó 2012-7-5 23:35 ½s¿è

³o¬O¤@­Ó®Ñ¤Wªº½m²ßÃD¥Ø Book1.rar (17.04 KB)
  1. Option Explicit
  2. Sub for_next()
  3.    
  4.     Dim I As Integer
  5.    
  6.     Sheets("Sheet2").Select
  7.    
  8.     For I = 1 To Range("§ó·s·s·s").Cells.Count '§ÚÃhºÃ«á­±ªº¦Y¤£¶ioffice07
  9.       
  10.        If Range("§ó·s·s·s").Cells(I) > Range("¤j¾÷¾÷¾÷").Cells(I) Then
  11.             
  12.             Range("§ó·s·s·s").Cells(I).Interior.Color = vbYellow
  13.        Else
  14.             Range("§ó·s·s·s").Cells(I).Interior.Color = vbCyan
  15.       
  16.        End If
  17.    
  18.     Next I

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


½Ð°Ý§Ú³o¸Ì¸Ó«ç»ò´ú¸Õ ©Î §ïµ½

ÁÂÁÂ

Sheet2.JPG (41.07 KB)

°ÝÃDªºSHEET2

Sheet2.JPG

¦]¬°§A¨S¦³©w¸q¦WºÙ
Range("§ó·s·s·s")¡ARange("¤j¾÷¾÷¾÷")³£­n©w¸q¦WºÙ¤~¥Í®Ä¡I

TOP

¥»©«³Ì«á¥Ñ m09903020 ©ó 2012-7-6 00:08 ½s¿è

¦^´_ 2# oobird


    ÁÂÁ´£¥Ü¡F¥i¥H½Ð±z¥Ü½d³oºØ½d³òªº©w¸q¤èªk¶Ü? ÁÂÁÂ
  1. Dim range("¤j¾÷¾÷¾÷") As range
  2.    
  3. §Ú¦ü¥GÆ[©À¤£¬O«Ü²M·¡­n«ç»ò¥Î
  4.     Dim range("§ó·s·s·s") As range
  5.    
  6.     range("¤j¾÷¾÷¾÷") = range(R3C1)
  7.     range("§ó·s·s·s") = range(R3C6)
  8.    
½Æ»s¥N½X

TOP

¦^´_ 1# m09903020


    ¨ç¼Æ¡B¹Ïªí...µ¥¥\¯à¤Î¨ä¥LExcel¤@¯ë¨Ï¥Î°ÝÃD
     ³o¨à¥u¯à°Ý¤W­z°ÝÃD..... vba ­n¨ìµ{¦¡°Ï

TOP

¦^´_ 4# chen_cook

¯u¬O©êºp ²{¦b¤~µo²{µo¿ù¦ì¸m

¯u¬O¤£¦n·N«ä!

TOP

        ÀR«ä¦Û¦b : ¹ï¤÷¥À­nª¾®¦¡A·P®¦¡B³ø®¦¡C
ªð¦^¦Cªí ¤W¤@¥DÃD