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

EXCEL VBA ½Ð¯q

EXCEL VBA ½Ð¯q

½Ð°Ý«e½ú
±`±`·|¥X²{¿ù»~°T®§«¬ºA¿ù»~¡A½Ð°ÝVBA °²³] Cells(4, 26)¬°N/A , ­n¥Î¤°¤è¦¡by pass &Âo±¼¡C

bugµe­±

bug.jpg

¦^´_ 1# itskk

¯uªº¬On/a
     If Not IsError(Cells(4, 26)) Then
    µ{¦¡½X        
    End If
  
¤å¦rªºn/a  
    If Cells(4, 26) <> "N/A" Then
    µ{¦¡½X
    End If

TOP

¦^´_ 2# quickfixer

ÁÂÁ¤À¨É¡C¨Ï¥Î¤j¤jªº¤è¦¡Not IsErrorCells ·|Åã¥Ü¨S¦³©w¸qsub ©Î function  ½Ð°Ý¤j¤j¦³¹J¹L¶Ü?

    If Not IsErrorCells(Y, 58) > Not IsErrorCells(Y, 26) Then   


For Y = 4 To 1674 '¦³´X¦æ­n§ï¼Æ¦r(«á­±­n¥[¦Û°Ê¼Æ¦r)

    If Not IsErrorCells(Y, 58) > Not IsErrorCells(Y, 26) Then         
         If Not IsErrorCells(Y, 57) > Not IsErrorCells(Y, 26) Then
              If Not IsError(Cells(Y, 8) - Not IsErrorCells(Y, 26)) / Not IsErrorCells(Y, 26) > 0.025 Then
                  Cells(Y, 26).Interior.ColorIndex = 2
              Else
                  Cells(Y, 26).Interior.ColorIndex = 18
              End If
         Else
              If Not IsErrorCells(Y, 8) < Not IsErrorCells(Y, 26) Then
                  If Not IsErrorCells(Y, 11) > 0.5 Then
                  Cells(Y, 26).Interior.ColorIndex = 10
                  Else
                  Cells(Y, 26).Interior.ColorIndex = 4
                  End If
              Else
                  Cells(Y, 26).Interior.ColorIndex = 27
              End If
         End If
BUG2.jpg

TOP

¤£¦n·N«äVBA¬O­nÂo±¼  #N/A
¦^´_  itskk



¯uªº¬On/a
     If Not IsError(Cells(4, 26)) Then
    µ{¦¡½X        
    End If
  ...
quickfixer µoªí©ó 2022-9-11 20:15

TOP

¦^´_ 4# itskk

¤£¯à¥Î¬O¥´¿ù¦r,¨º­Ó¦h®æ­n¤@¦¸Àˬd¤~¦æ

    If IsError(Cells(y, 8)) Or IsError(Cells(y, 11)) Or IsError(Cells(y, 26)) Or IsError(Cells(y, 57)) Or IsError(Cells(y, 58)) Then
        '¨ä¤¤¤@®æ¦³n/a
    Else
        ­ì¥»ªºµ{¦¡½X
    End If

TOP

ÁÂÁ±z¥i¥H¤F
¦^´_  itskk

¤£¯à¥Î¬O¥´¿ù¦r,¨º­Ó¦h®æ­n¤@¦¸Àˬd¤~¦æ

    If IsError(Cells(y, 8)) Or IsError(Cell ...
quickfixer µoªí©ó 2022-9-11 21:03

TOP

        ÀR«ä¦Û¦b : «Ý¤H°h¤@¨B¡A·R¤H¼e¤@¤o¡A´N·|¬¡±o«Ü§Ö¼Ö¡C
ªð¦^¦Cªí ¤W¤@¥DÃD