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

§ä¥Xrow©Mcol°ÝÃD

¥»©«³Ì«á¥Ñ Hsieh ©ó 2010-10-29 19:43 ½s¿è
  1. Sub nn()
  2. If WorksheetFunction.CountIf( Range("A1:C5,E6:G10,A11:C15 "), 1) = 1 Then
  3. For Each a In Range("A1:C5,E6:G10,A11:C15 ")
  4.   If a = 1 Then i1 = a.Row: j1 = a.Column: Exit For
  5. Next
  6. End If

  7. MsgBox i1 & "    " & j1

  8. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 2# Hsieh

ÁÂÁ¤j¤j.
¦ý§Ú¬O·Q­n³o­Ó.
½Ð°Ý¤j¤j³o­Ó¥i¥H¤Æ²¶Ü?
  1. Sub nn()
  2. b = 0
  3. For Each a In Range("A1:C5,E6:G10,A11:C15 ")
  4. b = b + WorksheetFunction.CountIf(a, 1)
  5. Next

  6. If b = 1 Then
  7. For Each a In Range("A1:C5,E6:G10,A11:C15 ")
  8.   If a = 1 Then i1 = a.Row: j1 = a.Column: Exit For
  9. Next
  10. End If

  11. MsgBox i1 & "    " & j1

  12. End Sub
½Æ»s¥N½X
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

¦^´_ 1# basarasy
  1. Sub nn()
  2. For Each a In Range("A1:C5,E6:G10,A11:C15 ")
  3.   If a = 1 Then i1 = a.Row: j1 = a.Column: Exit For
  4. Next
  5. MsgBox i1 & "    " & j1
  6. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ¡i®É¶¡¦¨´N¤@¤Á¡j®É¶¡¥i¥H³y´N¤H®æ¡A¥i¥H¦¨´N¨Æ·~¡A¤]¥i¥HÀx¿n¥\¼w¡C
ªð¦^¦Cªí ¤W¤@¥DÃD