- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 253
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-11-22
|
¥»©«³Ì«á¥Ñ Hsieh ©ó 2013-3-10 10:14 ½s¿è
¦^´_ 22# 198188
³o¼Ëªºµ{¦¡»P¼Ó¤Wµ{¦¡½X¤ñ¸û¬Ý¬ÝÀ³¸Ó´N®e©ö¤F¸Ñ- Sub ex()
- Dim Sh As Worksheet, Rng As Range, C As Range, Ar()
- fd = ThisWorkbook.Path & "\" '¸ê®Æ¨Ó·½¥Ø¿ý
- fs = "DOCS RECEIVED N RELEASED RECORD.xlsx" '¸ê®Æ¨Ó·½ÀÉ®×(§t°ÆÀɦW)
- With Workbooks.Open(fd & fs)
- Set Sh = .Sheets("¦¬¥ó°O¿ý")
- With ThisWorkbook.Sheets("State")
- For Each A In .Range(.[A2], .Cells(.Rows.Count, 1).End(xlUp))
- Set Rng = Sh.Columns("D").Find(A, lookat:=xlWhole)
- If Not Rng Is Nothing Then
- For Each C In Sh.Range(Rng, Sh.Cells(Sh.Rows.Count, 4).End(xlUp))
- If C = A And InStr(UCase(C.Offset(, 4).MergeArea(1)), "OBL") > 0 Then
- ReDim Preserve Ar(s)
- Ar(s) = C.Offset(, 4).MergeArea(1)
- s = s + 1
- End If
- Next
- If s > 0 And A.Offset(, 9) = "" Then
- A.Offset(, 9) = Join(Ar, "¡B")
- Erase Ar
- s = 0
- Else
- A.Offset(, 9) = ""
- End If
- End If
- Next
- End With
- .Close
- End With
- End Sub
½Æ»s¥N½X |
|