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

¤@¥÷·sªºVBA¹J¨ìªº°ÝÃD

¤@¥÷·sªºVBA¹J¨ìªº°ÝÃD

§Ú¦b°µ¤@¥÷·sªºVBA¡K¡K¹J¨ì¤@­Ó°ÝÃD¡A·Q½Ð±Ð¤@¤Uª©¤Wªº¥ý¶i¡K¡K

¤@¡B
¥»¨Ó¬O·Q¥Î¶i¶¥¿z¿ïªº¡A¦ý¬Oµo²{¶i¶¥¿z¿ï¨S¦³¿ìªk¹ïÃC¦â°µ¿z¿ï¡C
¨Ò¦p¡G§Ú­n¿z¿ï¥X¬õ¦âªºÀx¦s®æ
¤£ª¾¹D¥ÎVBA¬O¤£¬O¦³¨ä¥¦ªº¤èªk¥i¥H¸Ñ¨M¡K¡K

¤G¡B
¥t¥~¡A¦pªG¤£¥Î¶i¶¥¿z¿ïªº¸Ü¡A¥i¤£¥i¯à¿ï¥X°ß¤@­È(¤£­n­«½Æªº­È)
ªì¾ÇVBA¥E¨ìtwbts

¦^´_ 12# GBKEE

§Ú±j­¢§Ú¦Û¤w¡A«D¨ì¤£±o¥H¤£¥Î¿ý¨îªº¡A¿ý¨îªº·|¿ý¤@¤j°ï¥Î¤£¨ìªºªF¦è¡C
¤j³¡¤À§Ñ°Oªº»yªk¡A´N¤Wºô¬d¡A¤£°O±oªºªF¦è´N¬d®Ñ¡I¡I¡I
ªì¾ÇVBA¥E¨ìtwbts

TOP

¦^´_ 11# play9091
¦h¦h§Q¥Î¿ý»s¥¨¶°,·|¶i¨Bªº.

TOP

¥»©«³Ì«á¥Ñ play9091 ©ó 2011-7-26 13:32 ½s¿è

¦^´_ 10# GBKEE

·PÁª©¥D­@¤ßªº¦^µª¡A§Ú¸Õ¦¨¥\¤F¡K¡K¤§«e¬OÀɦW§ì¿ù¡K¡K

ÁÙ¦³¥t¥~¤@­Ó¥Î³oºØ¤èªk¦³¨S¦³¿ìªk¥uCOPY­È¡A¦]¬°§Úªº¨Ó·½¬O¥Î¤½¦¡¨Óªº¡I§Ú·Q­n¥u¶K¤Wµ²ªGªº¸Ü¦³¥i¯à¶Ü¡H¡I

§Ú§ä¨ì¤èªk¤F¡K¡K
  1.     Workbooks(KPI).Sheets("Sheet2").Range(W).Copy
  2.     Workbooks(con).Sheets("¼È¦s­¶").Range("A1").PasteSpecial Paste:=xlPasteValues
½Æ»s¥N½X
­ì¨Ó¡A¥¦¥i¥H¬O¤G¬q¤À¶}¨Ó¼gªº»yªk¡K¡K¬Ý¨Ó§ÚÁÙ±o¦h¾Ç²ß¤@¤U¡K¡K
ªì¾ÇVBA¥E¨ìtwbts

TOP

¦^´_ 9# play9091
¤S¥X¿ù  ¤½¦¡¨S°ÝÃD°Ú, °õ¦æ¶¥¬q¿ù»~ 9:  ¹ï¶Ü?
ÀˬdWorkBook ¬O¤w¶}±Òªº¶Ü?  ¤u §@ªí¦WºÙ¦s¦b¶Ü?

TOP

¦^´_ 8# GBKEE

²Ä¤@­Ó°ÝÃD§Ú¤w¸g¥Î§Úªº¤èªk¸Ñ¨M¤F¡I

µM«á¡K¡K¥X¿ùªº¦a¤è¡A¨º¬O§Ú¥´¿ù°Õ¡I¡I
Workbooks("book1").Sheets("sheet1").Range("B11:D12").Copy Workbooks("book2").Sheets("sheet2").Range("A1")
§Y¨Ï¬O³o¼Ë¤lÁÙ¬O¿ù¡I¨S¦³¿ìªk°õ¦æ¡I¡I¡I¡I
ªì¾ÇVBA¥E¨ìtwbts

TOP




¦^´_ 7# play9091
²Ä¤@­Ó°ÝÃD¦n¹³¨S¦³§¹¥þ¨M¸Ñ  ·í ¿z¿ï¨ìªº¸ê®Æ ¤£¬O³sÄò½d³ò, ®É´N¤£¦æ®@!
  1. Rng.Copy Sheets("Sheet2").[A2] '§A­nªº¦ì¸m
  2.            Sheets("Sheet2").[A2:D2].Delete xlUp '§R°£¨º¤@¦Cªº½d³ò
  3. ©Î¬O    Sheet2.[A2].EntireRow.Delete '¾ã¦C§R°£
½Æ»s¥N½X
      
¿ù»~¦b¨º¸Ì§ä§ä¬Ý
Workbooks("X').Sheets("Y").Range("B11:D12").Copy Workbooks("Z").Sheets("G").Range("A1")

TOP

¦^´_ 6# GBKEE

·PÁª©¥D¡A¼ö¤ßªº«ü±Ð¡C
¦]¬°¨Ï¥Î¡uCurrentRegion¡vªº¸Ü¡A·|§â²Ä¤@¦C¤]¿ï¶i¥h¡A©Ò¥H«á¨Ó§Ú¥Î¤F¨ä¥¦ªº¤èªk¨Ó¸Ñ¨M¤F§Úªº°ÝÃD¡C¦p¤U¡K¡K
  1.     NowR = Range("A65535").End(xlUp).Row '¨ú±o¥i¨£¦Cªº¦C¸¹
  2.     If NowR <> 2 Then '²Ä¤G¦C¬°©ïÀY¡A­Yµ¥©ó¤G´N¤£°µ¤U­±ªº¨Æ
  3.     Selection.Copy
  4.     Sheets("ÀWÂI").Select
  5.     Range("A1").Select
  6.     Call ¶K¤W­È
  7.     Selection.Font.Color = RGB(255, 0, 0)
  8.     Call ²¾°£­«½Æ
  9.     Sheets("Cluster " & i).Select
  10.     End If
½Æ»s¥N½X
µM«á¡K¡K²{¦b§Ú¹J¨ì¤F¥t¥~¤@­Ó°ÝÃD¡A¤W­±¤]°Ý¹L¤F¡Aª©¥D¤]¦³¦^µª¹L¤F¡A¦ý¤p§Ì¥\¤O©|²L¡A¨S¦³¿ìªk²z¸Ñ¬°¤°»ò³o¼Ë¤l¼g¡K¡K
¦Ó§Ú¥Î§Ú¦Û¤wªº¤èªk¤]§Ë¤£¥X¨Ó¡A©Ò¥H·Q½Ð±Ð¤@¤U¡K¡K¤U­±³o¼Ë¤lªº¼gªk­þ¸Ì¦³¿ù¤F¡A¤S¡GÀ³¸Ó«ç»ò¼Ë¤l¥h­×¥¿©O¡H¡H
  1. Workbooks("X').Sheets("Y").Range("B11:D12").Copy Workbooks("Z").Sheets("G").Range("A1")
½Æ»s¥N½X
ªì¾ÇVBA¥E¨ìtwbts

TOP

¦^´_ 5# play9091
¬O³o¼Ë¶Ü?
  1. Sub ttt()
  2.     Sheets("Sheet1").Range("E3") = ""
  3.     Sheets("Sheet1").Range("E4").Value = "=AND(TEXT(RIGHT(A11, 8), ""hh:mm:ss"") >= ""02:00:00"",TEXT(RIGHT(A11, 8), ""hh:mm:ss"") <= ""21:30:00"")"
  4.     Set Rng = Range("A10").CurrentRegion
  5.     Rng.AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:=Range("E3:E4"), Unique:=False
  6.     Set Rng = Rng.SpecialCells(xlCellTypeVisible)   '¸ê®Æ°Ï¥i¨£ªºÀx¦s®æ
  7.     If Rng.Count > Rng.Columns.Count Then           '¦³¿z¿ï¨ì¸ê®Æ
  8.     'Rng.Count: ¿z¿ï¨ì¸ê®ÆÁ`¼Æ > Rng.Columns.Count: ¸ê®Æ°Ï¥i¨£Àx¦s®æªºªºÄæ¦ì¼Æ
  9.         Rng.Copy Sheets("SheetX").[A1]              '§A­nªº¦ì¸m
  10.     End If
  11. End Sub
½Æ»s¥N½X

TOP

¦^´_ 4# GBKEE

·PÁª©¥Dªº³sµ²¡A­è­è¬Ý¤F¤§«á¥h¹ê°µ¤F¤@¤U¡A«Ü¦n¥Î¡K¡K¤Ö¤F«Ü¦h¡uselect¡vªº°Ê§@¡K¡K

¤@¡B­è­è¤S¹J¨ì¤F¥t¥~¤@­Ó°ÝÃD¡A´N¬O¦pªG¥Î¤W­±³oºØ¤èªk¡A¨S¦³¿ìªk¨ú¥X¿z¿ï«áªºµ²ªG¡C
·N«ä¬O¡A¦pªG§Ú¿ï©w½d³ò¡AµM«á¹ï³o­Ó½d³ò§@¿z¿ï«á¡A¨S¦³¿ìªk¥Î¤W­±ªº¤èªk¨ú¥X¿z¿ï«áªºµ²ªG¡K¡K

¤G¡B¦pªG¥u¨ú¥X­Èªº¸Ü¦n¹³¤£¥i¥H¹ê²{¡A¦p¤U¡G
sheets(1).range("A1:A4")=sheets(2).range("A1")      ¡öFail

¤U­±³o­Ó¤~¬O§Ú²{¦bªº¤j°ÝÃD¡I¡I¡I
¤T¡B¿ï©w¤@­Ó½d³ò«á¡A¹ï³o­Ó½d³ò§@¿z¿ï¡A¦pªG³o¤@¦¸ªº¿z¿ï¨S¦³ªF¦è(µ²ªG)ªº¸Ü¡A³o®É­Ô¡uSelection.Copy¡v¾ã­Ó¿ï©wªº¸ê®Æ¥þ³¡½Æ¨î¡K¡K
         ¦³¤°»ò¤èªk¥i¥HÅý¥¦¤£½Æ¨î¨S¦³¿z¿ï¥X¨Óªº¸ê®Æ©O¡H¡H
ªì¾ÇVBA¥E¨ìtwbts

TOP

        ÀR«ä¦Û¦b : ·O´d¨S¦³¼Ä¤H¡A´¼¼z¤£°_·Ð´o¡C
ªð¦^¦Cªí ¤W¤@¥DÃD