- ©«¤l
- 1447
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 1471
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Excel 2010 & 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2020-7-15
- ³Ì«áµn¿ý
- 2024-12-5
|
¦^´_ 12# ã´£³¡ªL
½Ð±Ð«e½ú ½d¨Ò¤¤ªº§PÂ_¦¡ ¥H¦r¦ê¤ñ¤j¤p! ¬O¥H¤°»ò³W«h¤ñ¤j¤p©Îµ¥©ó?
If Crr(j)(k, 9 + j) <= Arr(i, 1) And Crr(j)(k, 11 + j) >= Arr(i, 1) Then
¦Û¤v¦³´ú¸Õ,¦ý¬OµLªk¤F¸Ñ³W«h!ÄAÂЫá¾Çªº»{ª¾! ¥H¬°¥u¦³¼Æ¦r¤~¯à¤ñ¸û!
Sub TEST_20220719()
If [A2] > [A3] Then
MsgBox "[A2] > [A3]"
Else
MsgBox "[A2] <= [A3]"
End If
End Sub
±zªº½d¨Ò§¹¾ã¤º®e¦p¤U:
Sub TEST_A2()
Dim Arr, Brr, Crr(2), xD(2), T$, i&, j%, k, Km%, TM
TM = Timer
Crr(1) = Range([L!m1], [L!a1].Cells(Rows.Count, 1).End(xlUp))
Crr(2) = Range([R!m1], [R!a1].Cells(Rows.Count, 1).End(xlUp))
For j = 1 To 2
Set xD(j) = CreateObject("Scripting.Dictionary")
For i = 2 To UBound(Crr(j))
T = Left(Crr(j)(i, j + 9), 7)
If Not IsObject(xD(j)(T)) Then
Set xD(j)(T) = CreateObject("Scripting.Dictionary")
End If
xD(j)(T)(i) = ""
Next i
Next j
Arr = Range([§Ç¸¹!a1], [§Ç¸¹!a1].Cells(Rows.Count, 1).End(xlUp))
ReDim Brr(1 To UBound(Arr), 1 To 2)
Brr(1, 1) = "¤u³æ¸¹½X": Brr(1, 2) = "¦ì¸m"
For i = 2 To UBound(Arr)
T$ = Left(Arr(i, 1), 7)
Km = 0
For j = 1 To 2
If Not IsObject(xD(j)(T)) Then
GoTo 666
End If
For Each k In xD(j)(T).keys
If Crr(j)(k, 9 + j) <= Arr(i, 1) And Crr(j)(k, 11 + j) >= Arr(i, 1) Then
Brr(i, 1) = Crr(j)(k, j)
Brr(i, 2) = Mid("LR", j, 1) & k
Km = 1
Exit For
End If
Next
If Km = 1 Then
Exit For
End If
666
Next j
Next i
[§Ç¸¹!b1].Resize(UBound(Brr), 2) = Brr
MsgBox Timer - TM
End Sub
ÁÂÁ «e½ú«ü¾É! |
|