- ©«¤l
- 234
- ¥DÃD
- 19
- ºëµØ
- 0
- ¿n¤À
- 276
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows XP
- ³nÅ骩¥»
- office 2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-1-7
- ³Ì«áµn¿ý
- 2021-10-7
|
¦^´_ 1# lionliu
¬O³o¼Ë¶Ü??
Sub desc()
'pk ctn
Dim i, j, rcnt As Integer
Dim x As Variant
Sheets("B").Select
rcnt = Cells(Rows.Count, 1).End(xlUp).Row
For i = 3 To rcnt
x = 1
Do While x <= Sheets("a").Range("a1").CurrentRegion.Rows.Count
If Sheets("a").Cells(x, 1) = Sheets("B").Cells(i, 1) And IsNumberic(Cells(i, 3).Value) Then
Cells(i, 2) = Sheets("A").Cells(x, 2)
Cells(i, 2).Offset(1) = Sheets("A").Cells(x, 2).Offset(1)
End If
x = x + 1
Loop
Next
Set x = Nothing
End Sub
Function IsNumberic(Value As String) As Boolean
If Value Like "[+-]*" Then Value = Mid$(Value, 2)
IsNumberic = Not Value Like "*[!0-9.]*" And Not Value Like "*.*.*" And _
Len(Value) > 0 And Value <> "."
End Function |
|