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

[µo°Ý] µæ³¾½Ð°Ý~

[µo°Ý] µæ³¾½Ð°Ý~

¤p§Ì¦³­Ó°ÝÃD¡A¬Ý¤F1­Ó±ß¤Wªººô¸ô¸ê®Æ¡AÁÙ¬O·Q¤£¨ì­n«ç»ò²¤Æ~
·Q½Ð°Ý¦U¦ì¦Ñ®v:
§Úªº·Qªk¬O¦bexcel²Äcells(i,1)¤¤¤ñ¹ï¯S©w¦r¦ê(¤j¬ù1²Õ¦³5~10¦r¦ê¡A¤j¬ù¦³5²Õ)¡A
¨Ò¦pA²Õ(¦³TA11,TA16,TA18~)
B²Õ¦³(TA12,TA13,TA19,TA58~)
C²Õ~
n²Õ¡C
=>¦r¦ê¤¤¡A¼Æ¦r¤Î­^¤å¦rµL³W«ß¤Î³W«h©Ê¡C
§ä¨ì¨º¤@²Õ¤¤ªº¦r¦ê«á¦bcells(i,3)¥N¤J¸Ó²Õªº"¯S©w¦r¦ê"¡A
§Ú¸Õ¼g¥¨¶°¦p¤U:
(§Ú¬O­n¬Ý¦³¿ëªk²¤Æif ±ø¥ó¦¡¤¤ªº¤ñ¹ï¦r¦ê)
Ps:§ÚÁÙ¥¼§â©Ò¦³­n¤ñ¹ïªº¦r¦ê©ñ¤W¨Ó¡A©ñ¤W¥h·|ÆZ¦hªº:L ¡C

Sub AAA()
Dim i As Integer
For i = 1 To 10000
If Cells(i, 1) = "TA11" Or Cells(i, 1) = "TA16" Or Cells(i, 1) = "TA18" Then
Cells(i, 3) = "YES"
ElseIf Cells(i, 1) = "TA12" Or Cells(i, 1) = "TA13" Or Cells(i, 1) = "TA19" Or Cells(i, 1) = "TA58" Then
Cells(i, 3) = "YES,sir"
ElseIf Cells(i, 1) = "CA11" Or Cells(i, 1) = "CA16" Or Cells(i, 1) = "CA18" Or Cells(i, 1) = "CA28" Then
Cells(i, 3) = "you right!!"
ElseIf Cells(i, 1) = "AA31" Or Cells(i, 1) = "AA56" Or Cells(i, 1) = "AA18" Or Cells(i, 1) = "AA68" Then
Cells(i, 3) = "HI"
Else
Cells(i, 3) = "NO"
End If
Next

End Sub
½Ð±Ð¦Ñ®v¤F~~·PÁ¡A·PÁÂ!!!

½s­Ó¡e¹ï·Óªí¡f¡A
¨Ï¥Î VLOOKUP ´N²³æ³\¦h¡ã¡ã

TOP

http://blog.xuite.net/hcm19522/twblog/214357857
°Ñ¦Ò§Y¥i

TOP

ª©¤j~¤F¸Ñ!
§Ú¥Îvlookup¸Õ¼g¤F¤@¤U¡A§Ú¤~µo²{¸ò¥Îexcel¤@ÂI³£¤£¦P¡C
¤£¹L²×©ó¸Õ¥X¨Ó¤F~¤£ª¾ÁÙ¦³§ï¶iªºªÅ¶¡¶Ü?

Sub vlookup()
Dim data As Range
Set data = ['¹ï·Óªí'!$A$1:B$100]
For i = 2 To 1000
Cells(i, 2) = Application.vlookup(Cells(i, 1), data, 2, 0)
Next
End Sub

TOP

¦^´_ 4# amd8000x

­è¾Ç¹L..²{¾Ç²{½æ
vlookup¨S§ä¨ì·|¦^¶Ç¿ù»~©Ò¥H­n¥[­Ó®Æ
Dim  j As Variant
k=Cells(i, 1)
j=Application.vlookup(k, data, 2, 0)
If Not IsError(j) Then
Cells(i,2)=j
End If

TOP

¦^´_ 1# amd8000x
  1. Sub AAA()
  2.     Dim i As Long, arData
  3.     Const GROUP_A = Array("TA11", "TA16", "TA18")
  4.     Const GROUP_B = Array("TA12", "TA13", "TA19", "TA58")
  5.    
  6.    
  7.     arData = Range("A1").Resize(Cells(Rows.Count, 1).End(xlUp).Row, 3).Value
  8.     For i = 1 To UBound(arData)
  9.         If Not IsError(Application.Match(arData(i, 1), GROUP_A)) Then
  10.             arData(i, 3) = "YES"
  11.         ElseIf Not IsError(Application.Match(arData(i, 1), GROUP_B)) Then
  12.             arData(i, 3) = "YES,sir"
  13.         End If
  14.     Next
  15.     Range("A1").Resize(UBound(arData), 3).Value = arData
  16. End Sub
½Æ»s¥N½X
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C

TOP

        ÀR«ä¦Û¦b : ¤f»¡¤@¥y¦n¸Ü¡A¦p¤f¥X½¬ªá¡F¤f»¡¤@¥yÃa¸Ü¦p¤f¦R¬r³D¡C
ªð¦^¦Cªí ¤W¤@¥DÃD