- ©«¤l
- 88
- ¥DÃD
- 13
- ºëµØ
- 0
- ¿n¤À
- 104
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- OFFICE2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-1-3
- ³Ì«áµn¿ý
- 2017-12-31
|
¥»©«³Ì«á¥Ñ yagami12th ©ó 2012-2-27 12:07 ½s¿è
¦^´_ 10# GBKEE
¦^GBKEE¤j¡A¦]¬°¬Ý½d¨Òvba¤Þ¼Æªº³¡¥÷¤@ª½µLªk¤F¸Ñ¡A´N¬O¤U±µ{¦¡½X¬õ¦â¦rÅ骺³¡¥÷¡A©Ò¥H·Q½Ð±ÐGBKEE¤jÃö©ó¤Þ¼Æªº°ÝÃD¡G
--------------------------------------------------------------------------------
Option Explicit
Dim Flag
Dim myRow As Integer
Dim newSheet As String
Sub addsheetVer2()
Static Num As Integer
Sheets.Add after:=Sheets(Sheets.Count) '«ü¦W¤Þ¼Æ¡A¼Æ¸ÓexcelÀɦ³´XÓsheet©ñ¦b³Ì¥kÃä
Sheets(Sheets.Count).Select
ActiveSheet.Name = "pick & num"
Num = Num + 1
End Sub
----------------------------------------------------------------
Sub ChooseVer2(rowChoose, sheetName As String) 'ì¥ý¥u¦³¿é¤J¦C¸¹¡A²{¦bn¥[¤W¤u§@ªíªº¦W¦r
If Worksheets(sheetName).Cells(rowChoose, 5).Value > 10 Then
Flag = 1 '¥u¿ï¨ú«ü©wsheetªº¸ê®Æ°µ¿z¿ï
End If
End Sub
-------------------------------------------------------------------
Sub CopyPasteVer2(rowCopy, rowPaste, copySheet As String, pasteSheet As String) 'copy the row rowcopy in sheet with name "2330"
Dim myStr As String 'and paste to the row rowpaste in the sheet "pick"
Sheets(copySheet).Select
myStr = rowCopy & ":" & rowCopy
Rows(myStr).Select
Selection.Copy
Sheets(pasteSheet).Select <<<<<<<³o¸Ì¥X²{°}¦C¯Á¤Þ¿ù»~9¡A§â«_¸¹ªº¿ù»~§ó¥¿ÁÙ¬O¤@¼Ë~~
myStr = "A" & rowPaste
Range(myStr).Select
ActiveSheet.Paste
End Sub
-----------------------------------------
Sub main3()
Dim myRange As Range
Dim myCell, i
Dim mySheet As String
Set myRange = Application.InputBox("Choose the days", Type:=8) 'À°§Ú¿ï¨ú§Ún¿z¿ïªº½d³ò
mySheet = InputBox("input the sheet name you analyze") '¿ï¾Ü¤u§@ªí
addsheetVer2 '°õ¦æ¤Wz·s¼W¤u§@ªíªºµ{¦¡¡A¨C¦¸¼W¥[ªº¤£¤@¼ËmyRow = 1
For Each myCell In myRange '¦b§Úªºmyrange¸Ì¹ï¨C¤@Ómycell¡A¨Ó°µ¤U±ªº¨Æ±¡
Flag = 0 '¤£²Å¦X§Úªºn¨D´N¸õ¨ì¤U¤@°é¥h¬Ý¬O§_¦³²Å¦X
i = myCell.Row
ChooseVer2 i, mySheet '¿ï¨ú¦æÀË´ú¬O§_²Å¦X§Ú³]ªº±ø¥ó
If Flag = 1 Then 'choose¤lµ{§Ç§âflag§ïÅÜ
CopyPasteVer2 i, myRow, mySheet, newSheet
myRow = myRow + 1
End If
Next
End Sub |
|