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

¤£¦P¤u§@ªí¤ºªº¸ê®Æ¤ñ¹ï»P¶ñ¤J.

¦^´_ 7# HUNGCHILIN

   ªü¦Nª©¥D:¤£¬O¦Ò¸Õ,¬O¯uªº¤£À´,¸g¹L§Aªº¸ÑÄÀ·N«ä¬O³o¼Ëªº¶Ü?

   Dim a, b As Intger

   1)a ©M b ªº«¬§O¬O¤£¤@¼Ëªº. (a ¬O Variant <Excel ªº¹w³]«¬§O> ), b ¬OInteger .
   2)·N«ä¬O Dim «á­±ªº",", ¬O¤@­Ó¤@­ÓÅܼƪº¤À¹j, ¨C­ÓÅܼƳ£¬O¿W¥ßªº.

   §Æ±æ³o¦¸¯uªº·dÀ´¤F,¼g VBA ®É±`¦b³o¸Ì¥X¿ù.
V98

TOP

³o«h¦n¹³¦³¦Ò¸Õªº·Pı
¤@¬Ý¨ì²Ä1¶µ´Nª¾¹D¤£¤@¼Ë
Á|­Ó¨Ò¤l
Sub DimAs1()
Dim Mynum1, Mynum2 As Integer '³o±ø Mynum1 ¤£·|ÅÜInteger
Dim Total As Integer, MyString As String * 4 '¦r¦êªø«×¬°4

    MyString = _
    "¼¶¼g¤p§Þ¥©": MsgBox MyString: MsgBox TypeName(MyString)

End Sub

TOP

¦^´_ 4# GBKEE

½Ð°Ý  «Å§i¦¡
        1).Dim E As Range , I   ©M    Dim  E, I  As Range   ¬O¤@¼Ëªº·N«ä¶Ü?

        2).For Each E In Sheet1.Range("A:A").SpecialCells(xlCellTypeConstants)
            ¤¤¦pªG¥u³o¼Ë¼g  Sheet1.range("A:A")  ©M  Sheet1.Range("A:A").SpecialCells(xlCellTypeConstants) ªº®t§O¦b¨º¸Ì? ¤£¬O³£·|±½´y¤@¹M¶Ü?

        3).I = Application.Match(E, Sheet2.Range("A:A"), 0)
            ³o¼Ë¤@¦æ³o·|¦bSheet2.Range("A:A")±½´y¥X¬Ûµ¥ªº¸ê¶Ü?

        4.)If IsNumeric(I) Then E.End(xlToRight).Offset(, 1) = Sheet2.Cells(I, "B")
            ¬°¤°»ò­n§@°µ  IsNumeric(I) ³o­Ó°Ê§@ ©O?
V98

TOP

¦^´_ 4# GBKEE


ÁÂÁÂ.
³o¬O§Ú¨S¥Î¹Lªº»yªk.
°ÝÃD±o¨ì¸Ñ¨M¤F.
¦A¨Ó§Ú·|¬ã¨s¤@¤U³o¨Ç»yªkªº¤º®e.

TOP

¦^´_ 3# MRSA
  1. Sub Ex()
  2.     Dim E As Range, I
  3.     For Each E In Sheet1.Range("A:A").SpecialCells(xlCellTypeConstants)
  4.         I = Application.Match(E, Sheet2.Range("A:A"), 0)
  5.         If IsNumeric(I) Then E.End(xlToRight).Offset(, 1) = Sheet2.Cells(I, "B")
  6.     Next
  7. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# asus103


¨Ï¥Îexcel¨ç¼Æ³o­Ó§Úª¾¹D«ç»ò¼g.
§Úªº°ÝÃD¬O,§Ú­n¨Ï¥ÎVBA¶i¦æ³o¶µ¤u§@.§Ú¸Ó«ç»ò¼g»yªk?

TOP

¥»©«³Ì«á¥Ñ asus103 ©ó 2011-1-9 17:45 ½s¿è

©óSHEET 1 ªºD1¤¤¼g¤J
=IF(ISERROR(VLOOKUP(A1,Sheet2!A:B,2,FALSE)),"",VLOOKUP(A1,Sheet2!A:B,2,FALSE))
¦A¦V¤U©Ô
ASUS

TOP

        ÀR«ä¦Û¦b : ¥@¤W¦³¨â¥ó¨Æ¤£¯àµ¥¡G¤@¡B§µ¶¶ ¤G¡B¦æµ½¡C
ªð¦^¦Cªí ¤W¤@¥DÃD