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

[µo°Ý] ª«¥ó¬Ù²¤ªº¥["."»P¤£¥[°ÝÃD

¥»©«³Ì«á¥Ñ thps51134 ©ó 2011-12-20 10:47 ½s¿è

¦^´_ 10# GBKEE

¡@·Q½Ð±Ð±zcode¤¤¨â¦Cªº·N¸q
1. ²Ä¤@¦C "Option Explicit"

2. ²Ä11¦C "NewSh.Cells(Rows.Count, "A").End(xlUp).Offset(1)"
¡@¡@°j°é°õ¦æ¨ì³o¸Ì®É¡A¦ü¥G³Ì«á¤@¦Cªº¸ê°TµLªk§ó·s¡H (¤]©È§Ú§ï¼g¿ù¤F)
¡@¡@¨C¦¸©ó·sÀɮ׶K¤W³£¬O¶K¦b¦P¤@¦CQ_Q
  1. '¦Û¤v§ï¼gªº°j°é¤º; ²Ä¤E¦C°õ¦æ¦³°ÝÃD'
  2. For i = 22 To RowEnd      'RowEnd¬°¾ã­ÓSheet(1)¤¤ªº³Ì«á¤@¦C'
  3.     If Cells(i, 3).Value = "BU5" Then
  4.         If NewSh.Cells(2, 1) = "" Then  '¦]¬°Cells(1,1)³£¬°ªÅ, ©Ò¥H´«¤F§O®æ
  5.             Range(Cells(i, 1), Cells(i + 1, 2)).EntireRow.Copy NewSh.Rows(1)
  6.                  '·sÀɮ׳̫á¤@¦C«á
  7.                  '¦]¬°«e­±¨S¬Ý¨ìnewbo©Ò¥H´«¦¨NewSh...¤£ª¾¹D¦³¨S¦³»~·|'
  8.         Else
  9.             Range(Cells(i, 1), Cells(i + 1, 3)).EntireRow.Copy NewSh.Cells(Rows.count, "A").End(xlUp).Offset(1) '·sÀɮ׳̫á¤@¦C
  10.         End If
  11.     End If
  12. Next i
½Æ»s¥N½X
ÁÂÁÂ!

TOP

¦^´_ 11# thps51134
Option Explicit ³¯­z¦¡  ¦b¼Ò²Õ¼h¦¸¤¤±j­¢¨C­Ó¦b¼Ò²ÕùتºÅܼƳ£¥²¶·©ú½Tªº«Å§i¡C
¦p¹Ï


°j°é°õ¦æ¨ì³o¸Ì®É¡A¦ü¥G³Ì«á¤@¦Cªº¸ê°TµLªk§ó·s¡H (¤]©È§Ú§ï¼g¿ù¤F)
µ{¦¡½X¬O¨S°ÝÃDªº­n¬Ý¬ÝÀɮפº®e

TOP

        ÀR«ä¦Û¦b : ¤@­Ó¤H¤£©È¿ù¡A´N©È¤£§ï¹L¡A§ï¹L¨Ã¤£Ãø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD