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

¦³±ø¥ó¨ú¥NÀx¦s®æ¤º®e

¦^´_ 3# mmggmm
"¦pªG¦bSHEET"POST"G:G¬°"NO"«hÄÝ"YES"«O¯d¨ä¥L¥Î"X"¨ú¥N"
³o¥y¸Ü¥i¥H¦A¥Õ¸Ü¨Ç¶Ü?

TOP

¦^´_ 5# mmggmm
¬O³o¼Ë¶Ü?
  1. Sub Ex()
  2.     Dim Ay(1), Y
  3.     With Sheets("POSIT")
  4.         Ay(0) = Application.Transpose(.Range("O2:O" & .Range("O" & Rows.Count).End(xlUp).Row))
  5.         Ay(1) = Application.Transpose(.Range("P2:P" & .Range("P" & Rows.Count).End(xlUp).Row))
  6.     End With
  7.     For Each A In ActiveSheet.[H3:AL400]
  8.         Y = Application.Match(A, Ay(0), 0)
  9.         If IsError(Y) Then
  10.             A.Value = "X"
  11.         ElseIf Y > 0 And Cells(A.Row, "G") <> Ay(1)(Y) Then
  12.             A.Value = "X"
  13.         End If
  14.     Next
  15. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2011-7-3 11:26 ½s¿è

¦^´_ 7# mmggmm
¦¹°Ï(P16:Q24)¦b°õ¦æ¥¨¶°«á¥²©w«O¯d
¤£ºÞsheet"Meals"G:G¬OÄÝ"YES" "NO" ³£«O¯d¶Ü?

Q2:Q14 ¬ONO     ->sheet"Meals"G:G¬OÄÝ"YES"¥²©w«O¯d
Q25:Q36 ¬OYES  ->sheet"Meals"G:G¬OÄÝ"NO"¥²©w«O¯d
½Ð°ÝPOSIT ªºPÄæ©Ò¦³¸ê®Æ·|­«´_¶Ü?
P15:Q15¬°¦ó¬OªÅ¥Õªº

TOP

¦^´_ 9# mmggmm
¨Ì¾Ú 7¼ÓªþÀɭק諸
  1. Sub Ex()
  2.     Dim Ay(1), Y
  3.     With Sheets("POSIT")
  4.         Ay(0) = Application.Transpose(.Range("P2:P" & .Range("P" & Rows.Count).End(xlUp).Row))
  5.         Ay(1) = Application.Transpose(.Range("Q2:Q" & .Range("O" & Rows.Count).End(xlUp).Row))
  6.     End With
  7.     For Each A In ActiveSheet.[H3:AL400]
  8.         Y = Application.Match(A, Ay(0), 0)
  9.         If IsError(Y) Then
  10.             A.Value = "X"
  11.         ElseIf Y > 0 Then
  12.             If (Y <= 14 Or Y >= 24) And Cells(A.Row, "G") = Ay(1)(Y) Then A.Value = "X"
  13.         End If
  14.     Next
  15. End Sub
½Æ»s¥N½X

TOP

¦^´_ 11# mmggmm
  1. Sub Ex()
  2.     Dim Ay(1), Y As Integer, A As Range
  3.     With Sheets("POSIT")
  4.         Ay(0) = Application.Transpose(.Range("P2:P" & .Range("P" & Rows.Count).End(xlUp).Row))
  5.         Ay(1) = Application.Transpose(.Range("Q2:Q" & .Range("O" & Rows.Count).End(xlUp).Row))
  6.     End With
  7.     For Each A In ActiveSheet.[H3:AL400]
  8.         If A <> "" Then
  9.             Y = Application.Match(A, Ay(0), 0)
  10.             If IsError(Y) Then
  11.                 A.Value = "X"
  12.             ElseIf Y > 0 Then
  13.                 If (Y <= 14 Or Y >= 24) And Cells(A.Row, "G") = Ay(1)(Y) Then A.Value = "X"
  14.             End If
  15.         End If
  16.     Next
  17. End Sub
½Æ»s¥N½X

TOP

¦^´_ 13# mmggmm
Dim Ay(1), Y As Integer, A As Range
Y¬°¼Æ¦r«¬ºA¬OInteger
Y¤£¬°¼Æ¦r«h¶Ç¦^ ¿ù»~­È "#NA"
©T¶·§ï¬°   As Variantr ¨S³Q©ú½T«Å§i¬°¨ä¥L«¬ºA

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2011-7-6 10:15 ½s¿è

¦^´_ 15# mmggmm
§ó¥¿¬O As Variant ¤£¬O  As Variantr  ¬O§Ú¤£¤Ó¥Î¤ß!!  
PS:·PÁ oobird ª©¥D«ü¥¿

TOP

        ÀR«ä¦Û¦b : ¥¬¬I¦p¼½ºØ¡A¥HÅw³ß¤ß´þ¼íºØ¤l¡A¤~·|µoªÞ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD