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

[µo°Ý] §PÂ_½d³ò¤º¬O§_¥X²{#NA©Î¯S©w¦r¦ê

[µo°Ý] §PÂ_½d³ò¤º¬O§_¥X²{#NA©Î¯S©w¦r¦ê

³o­Ó¥i¥¿±`¹B§@¡A¥i¥HÀò¨ú¸Ó¦æ¸I¨ì²Ä¤@­Ónaªº¦ì¸m¡A¦ý§Ú¦³ºÃ°Ý

Sub test1()
Dim max_row As Integer
Dim i As Integer
Calculate '­«ºâ©Ò¦³Àx¦s®æ
max_row = Sheets("contorl").Cells(Rows.Count, 2).End(xlUp).Row 'Àò¨úBÄæ³Ì«á¤@®æªº¦ì¸m(²Ä´X¦ì)
For i = 2 To max_row
  If Not IsError(Range("N" & i)) Then error_var = i '¨ú±o²Ä¤@­Ó¸I¨ì¬ONAªº®æ¤l
   Next i
Debug.Print "¥X²{na¦ì¸m"; error_var; "Á`¦æ¼Æ"; max_row
End Sub

'³o¸ÌªºIf Not IsError(Range("N" & i)) Then error_var = i '¨ú±o²Ä¤@­Ó¸I¨ì¬ONAªº®æ¤l
'·Ó§Ú²z¸ÑÀ³¸Ó­n¬OIf IsError(Range("N" & i)) Then error_var = i ¤~¬O¦³¸I¨ìNA§â¦ì¸mI¼g¶ierror_var¸Ì
'¦ý¹ê»Ú°õ¦æ«o¬OIf Not IsError(Range("N" & i)) Then error_var = i ¤~·|§â¸I¨ìªºNA¼g¶ierror_var¸Ì

;==================§Ú¬O¤À®æ½u====================

Sub test2()
Dim max_row As Integer
Dim i As Integer
Calculate '­«ºâ©Ò¦³Àx¦s®æ
max_row = Sheets("contorl").Cells(Rows.Count, 2).End(xlUp).Row 'Àò¨ú³Ì«á¤@®æªº¦ì¸m(²Ä´X¦ì)
For i = 2 To max_row
  If Range("N" & i) = "E2" Then error_var = i '¨ú±o²Ä¤@­Ó¸I¨ì¬OE2ªº®æ¤l
   Next i
Debug.Print error_var
End Sub

¥H¤Wªº¥¨¶°¤U­±³o¥y·|³ø "°õ¦æ¶¥¬q¿ù»~ '13': «¬ºA¤£²Å¦X"
If Range("N" & i) = "E2" Then
½Ð°ÝÀ³¸Ó¦p¦ó­×§ï


¾ãÅ骺»Ý¨D¬O¥ý±q¬¡­¶Ã¯contorlÀò¨úB¦C¦³¸ê®Æªº³Ì«á¤@¦æ¼Æ ¦A¥h§PÂ_½d³òN¦C¬O§_¦³¥X²{NA©ÎµÛE2¡A­Y¦³«h³ø¿ù
°²³]B¦C¦³10¦æ¡A´N¬O§PÂ_N2~N10¬O§_¦³¥X²{NA©ÎE2
EXCELª©¥»¬O2003

¦^´_ 1# wei9133

½Ðªþ¤WÀɮסAÁÂÁÂ

TOP

Dim F As Range
Set F = Range("N:N").Find("#N/A", , xlValues, xlWhole)
If Not F Is Nothing Then MsgBox F.Address

TOP

¦^´_ 2# samwang


    §A¦n¡A¦]ªþ¥ó´îªÎ«áÁÙ¬O¤j©ó1MB¡A½×¾ÂµLªk¤W¶Ç¡A¬G©ñ¦b§KªÅ¸Ì
³sµ²¦b¦¹¡Ghttps://mir.cr/WQXCGOZK
ÂI¶i¥h«á¶i¤J¦Cªí«h¤@ªÅ¶¡¤U¸ü§Y¥i¡C

TOP

¦^´_ 3# ­ã´£³¡ªL


·PÁ¦^ÂÐ
±ßÂI°µ´ú¸Õ

TOP

        ÀR«ä¦Û¦b : ¦Y­W¤F­W¡B­WºÉ¤Ü¨Ó¡A¨ÉºÖ¤FºÖ¡BºÖºÉ´d¨Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD