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

[µo°Ý] ­YÀx¦s®æ­È¬°Y ·s¼W¤@Äæ ¼Æ­È¬°1

[µo°Ý] ­YÀx¦s®æ­È¬°Y ·s¼W¤@Äæ ¼Æ­È¬°1

2015-10-31_172115.png
·Q½Ð±Ð¦U¦ì¤j®v
­YAÄæÀx¦s®æ­È¬°Y
¦b¥kÃä·s¼W¤@Äæ
±N¦³YªºÀx¦s®æ¦bBÄæÅܦ¨1

§¹¦¨¦p¤U¡G
2015-10-31_172144.png



VBAªì¾ÇªÌ¡A¬ã¨s¤F¤@¤U¤È
´N¬O¨S¦³¿ìªk½Æ»s ...... help
¦æ¨ì¤ô½a³B¡A§¤¬Ý¶³°_®É

¦^´_ 1# bonnieyu53

µ{¦¡½X»P½d¨Ò¦p¤U¡A¿ï¾Ü1ºØ¤è¸Õ²z¸Ñ´N¥i¥H¤F:D
  1. Sub ªk1()
  2. Columns(2).Insert
  3. For Each rg In Range([a1], Cells(Rows.Count, 1).End(xlUp))
  4. If rg = "Y" Then rg.Offset(, 1) = 1 Else rg.Offset(, 1) = ""
  5. Next
  6. End Sub

  7. Sub ªk2()
  8. Columns(2).Insert
  9. R = [a1].CurrentRegion.Rows.Count
  10. For i = 1 To R
  11.   If Cells(i, 1) = "Y" Then Cells(i, 2) = "1" Else Cells(i, 2) = ""
  12. Next
  13. End Sub
½Æ»s¥N½X

¥[¤JÄæ.rar (13.12 KB)

TOP

¥»©«³Ì«á¥Ñ n7822123 ©ó 2015-10-31 17:59 ½s¿è

¦^´_ 2# n7822123


    ©êºp¡A­è­èº|¬Ý¤F¡A§Aªº²Ä¤@Äæ­ì¥»¬OYÅܦ¨ªÅ¥Õ¡A§ó¥¿¦p¤U
  1. Sub ªk1()
  2. Columns(2).Insert
  3. For Each rg In Range([a1], Cells(Rows.Count, 1).End(xlUp))
  4. If rg = "Y" Then rg.Value = "": rg.Offset(, 1) = 1
  5. Next
  6. End Sub

  7. Sub ªk2()
  8. Columns(2).Insert
  9. R = [a1].CurrentRegion.Rows.Count
  10. For i = 1 To R
  11.   If Cells(i, 1) = "Y" Then Cells(i, 1) = "": Cells(i, 2) = 1
  12. Next
  13. End Sub
½Æ»s¥N½X

¥[¤JÄæ2.rar (13.26 KB)

TOP

ÁÂÁÂ n7822123
¤Ó·P¿E¤F¡A¥i¥H¨Ï¥Î¡A«D±`ÁÂÁ±z¡I
¦æ¨ì¤ô½a³B¡A§¤¬Ý¶³°_®É

TOP

        ÀR«ä¦Û¦b : ¹D¼w¬O´£ª@¦Û§Úªº©ú¿O¡A¤£¸Ó¬O¨þ¥¸§O¤HªºÃ@¤l¡C
ªð¦^¦Cªí ¤W¤@¥DÃD