- ©«¤l
- 47
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 74
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows XP
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- Macau
- µù¥U®É¶¡
- 2011-6-15
- ³Ì«áµn¿ý
- 2016-7-4
|
¥»©«³Ì«á¥Ñ StanleyVic ©ó 2011-8-1 11:34 ½s¿è
¦^´_ 4# GBKEE
ÁÂÁ§Aªº¼ö¤ßÀ°§U.¥»¤H·s¤â.¥N½X¼g±o¦³ÂI¶Ã,Åý§A¨£¯º..
¬O³o¼Ëªº,¥»¨¤v¸g¦bsheet2¤¤°õ¤U³oӰʧ@. ¥N½X¦U¤è±§Ú¤v¸g¼g¦n,´N¬O®t¨º¤@¬qµ¹·d¶Ã¤F¦n¤[,³Ì«á§Ú¥Î¿ý,·í®É¦bMArco¤U.ok~¥i¥H.¦ý©ñ¶i¥h´N¤£¦æ.©ó¬O§Úµo¶K.¤~ª¾.§Ú¤í¤F With¤u§@ªí . (¤£¹L«ç¤]¦n. ¤]n¦A¦¸¦VÁÂÁÂ~)
Private Sub NegativeRecord_Click()
'Äò±i«¬¸¹¤u§@ªí§@¹Bºâ----------------------------------------------------------
Dim WsName, N, i, j, K As Integer '¤£¦P¤u§@ªí
Dim X, Y, Z As Integer '¦Û¨¤u§@ªíªº½d³ò
Dim Sh As Worksheet 'Dim(«Å§iÅܼƬ°¨p¥ÎÅܼÆ) «¬ºA¬° Worksheet(¤u§@ªí)
'²¾°£©Ò¦³Sh(¤u§@ªí)ªºHyperlinks(¶W³sµ²¶°¦Xª«¥ó)§R°£----------------------------
For Each Sh In Sheets
Sh.Hyperlinks.Delete
Next
'¥ýDelete©Ò¦³ÂÂRecord!---------------------------------------------------------
X = 4: Y = Range("A65536").End(xlUp).Row
Range("A4:D" & Y).Hyperlinks.Delete
Range("A4:D" & Y).ClearContents
'³]©w©Ò¦³«¬¸¹Sheet¤¤,¥H³ÌUpdataªº¤èªkpºâ¦] Out ¦Ó¤ÞPªº t¼ÆTotal °O¿ý------------
N = Worksheets.Count
For WsName = 3 To N
Sheets(WsName).Activate
i = Sheets(WsName).Range("IV3").End(xlToLeft).Column
For j = 2 To i
If Sheets(WsName).Cells(3, j).Value = "Out" Then
For K = 4 To Sheets(WsName).Range("A65536").End(xlUp).Row
If Sheets(WsName).Cells(K, j).Value <> "" And Sheets(WsName).Cells(K, j + 1) < 0 Then
'§Û data¶i¥h, Ū¥X¹ïÀ³¸ô®| ¤Î ¶W³sµ² ---------------
Cells(X, "A").Value = Sheets(WsName).Cells(K, 1)
Cells(X, "B").Value = Sheets(WsName).Cells(1, j - 2)
Cells(X, "C").Value = Sheets(WsName).Cells(K, j + 1)
Cells(X, "D").Value = Sheets(WsName).Name & "!" & Sheets(WsName).Cells(K, j + 1). _
Address(RowAbsolute:=False, ColumnAbsolute:=False)
With Sheets(2)
.Hyperlinks.Add Anchor:=.Cells(X, "D"), _
Address:="", _
SubAddress:=.Cells(X, "D").Value, _
TextToDisplay:=.Cells(X, "D").Value
End With
X = X + 1
End If
Next K
End If
Next j
Next WsName
Sheets(2).Activate
'¥u«O¯d³ÌUPdate¸ê®Æ--------------------------------------------
For Z = Range("A65536").End(xlUp).Row To 4 Step -1
If Cells(Z, "B").Value = Cells(Z - 1, "B").Value Then
Rows(Z - 1).Delete
End If
Next Z
MsgBox ("t¼Æ¸ê®Æ¤v¸g¥þ³¡Åã¥Ü !")
End Sub |
-
-
20002.JPG
(134.98 KB)
|