- ©«¤l
- 1
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 2
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN10
- ³nÅ骩¥»
- OFFICE2016
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2022-4-7
- ³Ì«áµn¿ý
- 2022-4-7
|
EXCEL VAB°ÝÃD
¤p§Ìº¦¸¦b³oª©¤Wµo¨¥¡A¦pªG¦³¸ÑÄÀ¤£²M·¡©ÎªÌ¤£¹ïªº¦a¤è¦A½Ð¥]²[¡A
¤é«e¨Ï¥Î¤@Ó«e½ú°µ¦nªºVBA¡A°õ¦æ«áÅã¥Ü"°õ¦æ¶¥¬q¿ù»~13"¡A¦³°ª¤â¥i¥HÀ°¦£¬Ý¤@¤U°ÝÃD¥d¦bþ¸Ì¶Ü?µ{¦¡½X¦p¤U¡G(¼Ð¥ÜÃC¦âªº¬O°»¿ù«áÅã¥Üªº)
Sub Update_¶O¥Î¤u§@©³½Z()
Dim Counter As Long
Dim myRecord(6) As Variant
Dim n As Long
Dim myLineNumber As Long
Dim ws As Worksheet
Dim SumBegin As String
Dim SumEnd As String
Set ws = ActiveSheet
Range("A9:F45").Select
Selection.ClearContents
Sheets("z2-DATABASE_SR_XMAST").Select
Range("A2").Select
Counter = 0
n = 0
myLineNumber = 0
Do Until IsEmpty(ActiveCell.Offset(Counter, 0).Value)
If UCase(ActiveCell.Offset(Counter, 0).Value) = UCase(ws.Range("N2")) Then
For n = 0 To 5
myRecord(n) = ActiveCell.Offset(Counter, n + 2).Value
Next
For n = 0 To 5
ws.Select
Range("A9").Select
ActiveCell.Offset(myLineNumber, n).Value = myRecord(n)
Next
myLineNumber = myLineNumber + 1
Sheets("z2-DATABASE_SR_XMAST").Select
Range("A2").Select
Else
End If
Counter = Counter + 1
Loop
ws.Select
Range("A9").Select
For n = 3 To 4
SumBegin = ActiveCell.Offset(0, n).Address
SumEnd = ActiveCell.Offset(myLineNumber + 1, n).Address
Next
End Sub |
|