- ©«¤l
- 1
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 2
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- OFFICE 2003
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2011-6-29
- ³Ì«áµn¿ý
- 2020-6-9
|
[µo°Ý] ¦p¦ó±NÀÉ®×A«Ø¥ßªº¸ê®Æ·s¼W¨ìÀÉ®×B?
¦³¤@Óexcel vbaªºÀɮסA³W¹º¦p¤U¡A¤T¬¡¶¡A¸ê®Æªí¡B¿é¤Jªí³æ¡B¦C¦L¡A"¿é¤Jªí³æ" ±N¬ÛÃö¸ê°TÁä¤J§¹²¦«á¡AÀ£"°e¥X¶s"±N¸ê®Æ¼g¤J¨ì"¸ê®Æªí"¡F"¦C¦L"¶¬O¥HVLOOKUPªº¤è¦¡§@·~¡A·í¿é¤J§Ç¸¹¡AÀÉ®×·|±q"¸ê®Æªí"¹ïÀ³¥X¬ÛÃö¸ê®Æ¡A¤§«á¦b¦C¦L¡CµM¦]¨Ï¥Îªºµ¡¤f¶V¨Ó¶V¦h¡A§Æ±æ¯à§JªA¤U¦C¬ÛÃö°ÝÃD¡A
§Æ±æ¤@¡G§â"¸ê®Æªí"ªº¬¡¶³æ¿W¿W¥ß¥X¤@ÓexcelÀɮסA¨Ã±N¸ÓÀɮשñ¸m¦b©T©wªº¸ô®|¡A¿é¤J¶ÂI°e¥X®É¡A¸ê®Æ§Y¼g¨ì¿W¥ßªºÀɮפº
§Æ±æ¤G¡G¦C¦L¶¡A¿é¤J¸ê®Æ®É¡A±qì¥ýÀɮתº"¸ê®Æªí"¤º©I¥s¡A§ï¦¨©I¥s"¿W¥ß¥X¥h«áªº¸ê®ÆªíÀÉ®×"¡A¥un¸ô®|§ïÅܧY¥i¶Ü?
Sub ADDON()
Dim motoSht As Worksheet, sakiSht As Worksheet, sakiRng As Range
Dim motoHani()
Set motoSht = Sheets("¿é¤Jªí³æ")
Set sakiSht = Sheets("¸ê®Æªí")
motoHani = Array("C3", "C4", "C5", "C6")
Set sakiRng = sakiSht.Range("B" & Rows.Count).End(xlUp).Offset(1)
For i = 0 To UBound(motoHani)
sakiRng.Offset(0, i).Value = motoSht.Range(motoHani(i)).Value
Next
sakiRng.Offset(, i).Value = Time
Sheets("¸ê®Æªí").Select
Range("B5:AD3000").Select
Selection.Sort Key1:=Range("B4"), Order1:=xlAscending, Key2:=Range("C4"), Order2:=xlDescending, Header:=xlNo, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
MsgBox "- - ¥[ªo - -"
Range("B4").Select
Sheets("¦C¦L").Select
Range("C5").Select
End Sub |
|