- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 8# jerrystock
¦³´N¤£½Æ»s¶Ü?- Option Explicit
- Sub Ex()
- Dim Rng(1 To 2) As Range
- With ¤u§@ªí2
- Set Rng(1) = .Range("b:b").Find("No securities to report.", Lookat:=xlWhole)
- 'BÄ椤§ä"No securities to report."
- If Not Rng(1) Is Nothing Then Exit Sub '¦³¦¹§¹¾ã¦r¦ê,Â÷¶}µ{§Ç
- Set Rng(1) = .Range("A1").CurrentRegion
- End With
-
- Set Rng(2) = ¤u§@ªí1.Range("B" & ¤u§@ªí1.Rows.Count).End(xlUp) 'BÄæ¥Ñ¤U©¹¤W¨ì¦³¸ê®ÆªºÀx¦s®æ
- If Rng(2) = "" Then 'BÄæ¥Ñ¤U©¹¤W¨ì¦³¸ê®ÆªºÀx¦s®æ = B1
- Set Rng(2) = Rng(2).Offset(0, -1) '¤U²¾ 0 ¦C,¥ª²¾¤@Äæ(¨ìAÄæ)
- Rng(1).Copy Rng(2) '½Æ»sªíÀY
- Else 'BÄæ¥Ñ¤U©¹¤W¨ì¦³¸ê®ÆªºÀx¦s®æ <> B1
- Set Rng(2) = Rng(2).Offset(1, -1) ',¤U²¾ ¤@¦C,¥ª²¾¤@Äæ(¨ìAÄæ)
- Rng(1).Offset(1).Copy Rng(2) '¤£½Æ»sªíÀY
- Rng(2).Cells(1) = Rng(1).Cells(1) 'AÄæ¿é¤J¤é´Á
- End If
- End Sub
½Æ»s¥N½X |
|