- ©«¤l
- 552
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 578
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- office 2010
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-2-8
- ³Ì«áµn¿ý
- 2024-7-9
|
¥»©«³Ì«á¥Ñ lpk187 ©ó 2016-3-16 09:10 ½s¿è
¦^´_ 11# peter95
¤U¹Ï¬OÅý§AÁA¸ÑRangeª«¥óªºOffsetÄÝ©Ê¡G¹Bºâ¦¡.Offset(¦Cªº°¾²¾¶q, Ä檺°¾²¾¶q)
·|Åý§A§ó®e©öÁA¸Ñµ{¦¡«ç»ò¹B§@ªº
- Option Explicit
- Sub Â^¨ú()
- Dim Rng As Range, aRng As Range, bRng As Range
- With Sheets("²Îp")
- .Range("B2:C" & .Cells(Rows.Count, 1).End(xlUp).Row).ClearContents
- For Each Rng In .Range("A2:A" & .Cells(Rows.Count, 1).End(xlUp).Row)
- Set aRng = Sheets("¥Ò").Columns(1).Find(Rng.Value, LookIn:=xlFormulas, LookAt:=xlWhole, SearchDirection:=2)
- Set bRng = Sheets("¤A").Columns(1).Find(Rng.Value, LookIn:=xlFormulas, LookAt:=xlWhole, SearchDirection:=2)
- If Not aRng Is Nothing Then Rng.Offset(, 1) = aRng.Offset(, 11)
- If Not bRng Is Nothing Then Rng.Offset(, 2) = bRng.Offset(, 11)
- Rng.Offset(, 6) = -(Rng.Offset(, 1) + Rng.Offset(, 1))
- Next
- End With
- End Sub
½Æ»s¥N½X |
|