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

[µo°Ý] ½Ð°Ý¦³µL¥i¥H¨ú¥NVLOOKUP¨ç¼ÆªºVBA¼gªk...

[µo°Ý] ½Ð°Ý¦³µL¥i¥H¨ú¥NVLOOKUP¨ç¼ÆªºVBA¼gªk...

¥Ñ©óVLOOKUP¥u¯à³æ¯Â¿é¤J¬d¸ß°Ñ·Ó"­È"
¦ý¦pªG»Ý­n³s¦P®æ¦¡¤@°_½Æ»s¹L¨ÓÀ³¸Ó¨S¦³¨ç¼Æ¥i¥H¨Ï¥Î
©Ò¥H·Q½Ð°Ý¤j®a¦³µLVBA¼gªk©Î¬O¨ä¥L¤èªk¥i¥H¨ú¥N...
( VLOOKUP+³]©w®æ¦¡¤Æ±ø¥ó³o¤è¦¡µLªk¨Ï¥Î¦b¶W¹L3­Ó±ø¥óªº¤½¦¡¸Ì¡CPS.EXCEL¬O¨Ï¥Î2003ªº )
ªþ¥ó¦³Á|¨Ò...
¤j®a¤@°_¨Ó¬ã¨s¬Ý¬Ý§a...

TEST-COLOR.zip (2.5 KB)

Á|¨ÒÀÉ

¥¼¤U¸üªþ¥óªì¾ÇªÌ¶Ã¦^³æ¯Â°Ñ¦Ò..­è´ú¤F¤@¤U¦³§â®æ¦¡½Æ»s¹L¥h(¬õ¦r²ÊÅé)
¥i¥H¥ÎCells.Find¶]VLOOKUP
cy = Sheets(2).Cells(i, "D")
Sheets(1).Select
Set kx = Cells.Find(What:=cy, After:=ActiveCell)
¥t¥~¦h±ø¥ó¤]¥i¥H¥Îand
if cells(1,1)="¶µ¥Ø" and cells(1,2)="»ù®æ" then
®æ¦¡³¡¤À¤]¥i¥H¦bµ{§Ç¥[¤W
§ï¬õ¦â¦rÅé
Cells(2, 2).Font.ColorIndex = 3
¶ñº¡¶À¦â
Cells(2, 2).Interior.ColorIndex = 6

TOP

¦^´_ 1# GGGYYY
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex_Match() '¤j¤p¼g¨S¦³¤À§O
  3.     Dim M As Variant, Rng As Range, E As Range
  4.     Set Rng = Sheets("¹ï·Ó").Range("A:A")
  5.     For Each E In Sheets("¼Æ­È").UsedRange.Columns(1).Offset(1).Cells
  6.         M = Application.Match(E, Rng, 0)   '¨S§ä¨ì¶Ç¦^¿ù»~­È
  7.         If IsNumeric(M) Then               '§ä¨ì¶Ç¦^¼Æ¦r
  8.             Rng.Cells(M, 2).Resize(, 2).Copy E.Offset(, 1)
  9.         Else
  10.             With E.Cells(1, 2).Resize(, 2)
  11.                 .Value = ""
  12.                 .Interior.ColorIndex = xlNo
  13.             End With
  14.         End If
  15.     Next
  16. End Sub

  17. Sub Ex_¦r¨åª«¥ó() '¤j¤p¼g¦³¤À§O
  18.     Dim E As Range, d As Object, i As Integer
  19.     Set d = CreateObject("scripting.dictionary") '¦r¨åª«¥ó
  20.     i = 1
  21.     With Sheets("¹ï·Ó")
  22.         Do While .Cells(i, "a") <> ""
  23.             Set d(.Cells(i, "a").Value) = .Cells(i, "a").Offset(, 1).Resize(, 2)
  24.             i = i + 1
  25.         Loop
  26.     End With
  27.     For Each E In Sheets("¼Æ­È").UsedRange.Columns(1).Offset(1).Cells
  28.         If d.EXISTS(E.Value) Then   'Dictionary ª«¥ó¤¤«ü©wªºÃöÁä¦r¦s¦b¡A¶Ç¦^ True¡A­Y¤£¦s¦b¡A¶Ç¦^ False¡C
  29.             d(E.Value).Copy E.Offset(, 1)
  30.         Else
  31.             With E.Cells(1, 2).Resize(, 2)
  32.                 .Value = ""
  33.                 .Interior.ColorIndex = xlNo
  34.             End With
  35.         End If
  36.     Next
  37. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

´ú¸Õµ²ªG
«e16¦æ´N¥i¥H¸Ñ¨M¸Ó°ÝÃD...
18-38¦æ¬O¥t¤@ºØ¸Ñªk¹ï§a...
¨âºØ³£¥i¥H¸Ñ¥Xµª®×...
·PÁª©¥Dªº´£ÂI...

TOP

¤p§Ì¤£¤~¡A¤À¨É¦Û¦æ¼g¥Xªº¤½¦¡§a
Sub Find()
x = InputBox("½Ð¿é¤J¼Æ­È")
Dim range1 As Range
Set range1 = Range("d2:i1000").Find(what:=x, LookIn:=xlValues, lookat:=xlWhole, searchorder:=xlRows, matchbyte:=True)
MsgBox (range1.Address)
End Sub
¦A§Q¥ÎFindNext¥i¥HÄ~Äò¤U¤@­Ó

TOP

¦^´_ 5# pegawang
·í range1 Is Nothing   
MsgBox (range1.Address)  ·|¥X¿ùªº
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¥ÌÄ@°µ¡BÅw³ß¨ü¡C
ªð¦^¦Cªí ¤W¤@¥DÃD