ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ¦p¦ó¦b¯S©w¦ì¸m¦Û°Ê¥[¤@?

[µo°Ý] ¦p¦ó¦b¯S©w¦ì¸m¦Û°Ê¥[¤@?

¥»©«³Ì«á¥Ñ yozcbm ©ó 2012-6-2 03:21 ½s¿è

¨Ò¦p§Ú¦³¤@°ï­û¤u¸ê®Æ,°²³]§Ú·Q¦b"©m¦W"¥ªÃä¥[¤W¶¶§Ç½s¸¹
e.g.
©m¦Wxxxxxxxxxxxxx
xxxxxxxxxxxxxxx
©m¦Wxxxxxxxx
xxxxxxxx
xxxxxxxxxxxxx
xxxxxxxxxxxx
©m¦Wxxxxxxxxxxxx
xxxxxxxxxxx
xxxxxxxxx
¥[½s¸¹«áÅܦ¨:
1©m¦Wxxxxxxxxxxxxx
xxxxxxxxxxxxxxx
2©m¦Wxxxxxxxx
xxxxxxxx
xxxxxxxxxxxxx
xxxxxxxxxxxx
3©m¦Wxxxxxxxxxxxx
xxxxxxxxxxx
xxxxxxxxx
.
.
.
p.s.¨C­Ó©m¦W¤¤¶¡¤§¦æ¼Æ¨Ã¤£¬Û¦P,,

§Ú­è¾ÇÃѤFif function,,
eg.=IF(B1="©m¦W",1,"")
¦pªG³o¼Ë¦A¦V¤U©Ôªº¸Ü¥u¯à¨C­Ó©m¦W®ÇÃä¥X²{"1"
¦Ó§Ú°ÝÃD¬O¦p¦ó¦h¤@­Ó"©m¦W"¥X²{´N¥[¤@?
thx so much~

¥t¥~¤@­Ó°ÝÃD¬O,¦pªGexcel¤º¦³«Ü¦h¦æ¼Æªº¸ê®Æ,¦Ó§Ú­ncopy (let say 5000ª½¦æ,­n¥]¬A¾ã¾î¦æ,¤£¬OA1:A5000),,«ç¼Ë¤~¯à¤ñ¸û§Ö±¶ªº¦V¤Ucopy? (¥u¥Î¦V¤U©Ôªº¤èªk¨C¦¸copy³£«ÜºC><)

¦^´_ 1# yozcbm
¤W¶Ç§AªºÀɮ׬ݬÝ

TOP

sample1.rar (14.37 KB)

uploaded~thx~

TOP

=IF(B4="©m¦W",COUNTIF(B$4:B4,"©m¦W"),"")

TOP

¦^´_ 3# yozcbm
  1. Option Explicit
  2. Sub Ex()
  3.     Dim Ar, xi As Integer, E As Range
  4.     With ActiveSheet.Range("b:b")   ' ActiveSheet  ¥i§ï¦¨->Sheets("SHEET1")
  5.         Ar = .Value
  6.         .Cells.Replace "©m¦W", "=1/0", xlWhole
  7.         .SpecialCells(xlCellTypeFormulas, xlErrors).Name = "©m¦W"
  8.          .Value = Ar
  9.         xi = 1
  10.         For Each E In [©m¦W]
  11.             E.Offset(, -1) = xi
  12.             xi = xi + 1
  13.         Next
  14.         ActiveWorkbook.Names("©m¦W").Delete
  15.     End With
  16. End Sub
½Æ»s¥N½X

TOP

¦^´_ 3# yozcbm
  1. Sub XX()
  2. C = 0
  3. With Sheets("Sheet1").[B:B]
  4.   Set Rng = .Find("©m¦W", , , xlWhole)
  5.   If Not Rng Is Nothing Then
  6.     Findaddress = Rng.Address
  7.     Do
  8.       C = C + 1
  9.       Rng.Offset(, -1) = C
  10.       Set Rng = .FindNext(Rng)
  11.     Loop While Not Rng Is Nothing And Rng.Address <> Findaddress
  12.   End If
  13. End With
  14. End Sub
½Æ»s¥N½X

TOP

¦^´_ 3# yozcbm
  1. Sub ex()
  2. With Range([A1], Cells(Rows.Count, 2).End(xlUp).Offset(, -1))
  3. .FormulaR1C1 = "=IF(RC[1]=""©m¦W"",COUNTIF(R1C2:RC2,""©m¦W""),"""")"
  4. .Value = .Value
  5. End With
  6. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ¥Ç¿ù¥XÄb®¬¤ß¡A¤~¯à²M²bµL·Ð´o¡C
ªð¦^¦Cªí ¤W¤@¥DÃD