- ©«¤l
- 216
- ¥DÃD
- 71
- ºëµØ
- 0
- ¿n¤À
- 292
- ÂI¦W
- 0
- §@·~¨t²Î
- window xp
- ³nÅ骩¥»
- 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2012-6-27
- ³Ì«áµn¿ý
- 2024-9-28
|
¦^´_ 2# lpk187
§A¦n, §Ú§ï¤F¦ý¥u¥i¥X²{1Ó¤H¤Î1¤éªº¸ê®Æ, ¨ºÓLOOP¤£ª¾¦p¦ó³B²z::(
Dim srcrange As Range, fndrange As Range
Dim fstaddress As String, i As Integer
Dim fc As Integer
Dim fr As Integer
Dim fr2 As Integer
Worksheets("attendance report").Activate
fc = 1
fr = 4
fr2 = 3
Set srcrange = Worksheets("data").Range("a4").CurrentRegion.Columns(9)
Set fndrange = srcrange.Find(what:=Cells(fr, fc) & Cells(fr2, 11).Value)
If Not fndrange Is Nothing Then
fstaddress = fndrange.Address
i = 5
Do
Cells(i, 11).Value = fndrange.Offset(, -2).Value
Cells(i + 1, 11).Value = fndrange.Offset(3, -2).Value
Cells(i + 7, 11).Value = fndrange.Offset(2, -2).Value
Cells(i + 8, 11).Value = fndrange.Offset(1, -2).Value
i = 1 + 1
Loop Until fndrange.Address = fstaddress
Else
MsgBox "XX"
End If
End Sub |
|