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

[µo°Ý] ³]©w¦Û°Ê·í¤é¸ê®Æ¶K¨ì·í¤ë¸ê®Æ

[µo°Ý] ³]©w¦Û°Ê·í¤é¸ê®Æ¶K¨ì·í¤ë¸ê®Æ

¥»©«³Ì«á¥Ñ 52ee24 ©ó 2015-12-31 08:52 ½s¿è

¦U¦ì¤j¤j½Ð°Ý¤@¤U
§Ú·Q§â¨C¤Ñ¾ã²zªº¸ê®Æ³]«öÁä¦Û°Ê§ó·s¨ì·í¤ë¸ê®Æªº³Ì¤U­±¤@¦C
·QÁקK¦pªG¤£¤p¤ß«ö¨ì´N¤S§â¸ê®Æ¦A¶K¤@¦¸
¦ý§PÂ_ªº¤è¦¡¦n¹³¤£¹ï
½Ð¦U¦ìÀ°¦£¬Ý¬Ý¨º¿ù¤F
ÁÂÁÂ
Sub MTD()
Dim a, b, c, today
today = InputBox("¿é¤J§ó·s¤é´Á¨Ò:yyyy/mm/dd")
a = Worksheets("Brick¸ê®Æ®w_1¦¸IR").Range("a2").CurrentRegion.Rows.Count
b = Worksheets("Brick¸ê®Æ®w_1¦¸IR").Range("a2").CurrentRegion.Columns.Count
c = Worksheets("Brick¸ê®Æ®w_1¦¸IR-MTD").Range("a1").CurrentRegion.Rows.Count
Worksheets("Brick¸ê®Æ®w_1¦¸IR").Select
'¬Ý¸ê®Æ¦³µL­«½Æ¶K
   If Worksheets("Brick¸ê®Æ®w_1¦¸IR-MTD").Range("a:a") = today Then
      MsgBox ("§ó·s¹L¤F")
   Else: Range(Cells(2, 1), Cells(a, b)).Copy Worksheets("Brick¸ê®Æ®w_1¦¸IR-MTD").Range("a" & c + 1)
   End If
'¼Ï¯Ã
Worksheets("Brick¸ê®Æ®w_1¦¸IR-MTD").Select
    Dim FF As Range
    Set FF = Worksheets("Brick¸ê®Æ®w_1¦¸IR-MTD").Range(Cells(1, 1), Cells(c + a - 1, b))
    Sheets("¥¢±Ñ²v").Select
    'MTD
    Range("b107").Select
    ActiveSheet.PivotTableWizard SourceType:=xlDatabase, SourceData:=FF
    ActiveSheet.PivotTables("¥¢±Ñ²v-MTD").PivotCache.Refresh

Sheets("¥¢±Ñ²v").Select
MsgBox ("MTD-¾ã²z§¹¦¨")

¦^´_ 1# 52ee24
¸Õ¸Õ¬Ý
  1. c = Worksheets("Brick¸ê®Æ®w_1¦¸IR-MTD").Range("a1").CurrentRegion.Rows.Count
  2. Worksheets("Brick¸ê®Æ®w_1¦¸IR").Select
  3. '¬Ý¸ê®Æ¦³µL­«½Æ¶K
  4.    If Worksheets("Brick¸ê®Æ®w_1¦¸IR-MTD").Range("a"&C) = Date Then
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 2# GBKEE


GBKEE¤j  §A¦n~
§Ú¬O·Q·j´MaÄ榳¨S¦³¬Û¦P¤é´Áªº
¦pªG¤w¸g¦³¤F´N¤£­n§â¸ê®Æ¶K¹L¥h
¦pªG§â§ï¦¨¡õ
If Worksheets("Brick¸ê®Æ®w_1¦¸IR-MTD").Range("a" & c) = Date Then
¬O¤£¬O´N¥u¬Ý"a&c"¨º¤@®æ
¦³¨S¦³·j´M¾ã­ÓÄæ¦ìªº¤èªk¶Ü?
¦A³Â·Ð¤j¤jÀ°¦£¤F
ÁÂÁÂ

TOP

¦^´_ 3# 52ee24

·Q·j´MaÄ榳¨S¦³¬Û¦P¤é´Áªº
¸Õ¸Õ¬Ý
  1. Dim Rng As Range
  2.     '¬Ý¸ê®Æ¦³µL­«½Æ¶K
  3.     Set Rng = Worksheets("Brick¸ê®Æ®w_1¦¸IR-MTD").Range("a:a").Find(Date, LookIn:=xlFormulas)
  4.     If Not Rng Is Nothing Then '¦bAÄæ ´M§ä ·í¤éªº¤é´Á ¦³§ä¨ì
  5.       MsgBox ("§ó·s¹L¤F")
  6.     Else: Range(Cells(2, 1), Cells(A, b)).Copy Worksheets("Brick¸ê®Æ®w_1¦¸IR-MTD").Range("a" & c + 1)
  7.         '¶K¤Wµ{¦¡½X
  8.     End If
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 4# GBKEE


ÁÂÁÂGBKEE ¤jªº±Ð¾É
¤w¸g¥i¥H¥Î¤F
ÁÂÁÂ
¥t¥~¦pªG­n·j´MÄæ¦ìªº­È¤£¬O¤é´Á¦Ó¬O¨ç¼Æ
½Ð°Ý³o¼Ë¤]·j´Mªº¨ì¶Ü?

TOP

¦^´_ 5# 52ee24


   

¿ý»s¥¨¶°µ{¦¡½X,½m²ßÅé·|¬Ý¬Ý
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 6# GBKEE


    ¦nªº
ÁÂÁÂGBKEE¤jªº±Ð¾É

TOP

        ÀR«ä¦Û¦b : ºw¤ô¦¨ªe¡C²É¦Ì¦¨ÅÚ¡A¤Å»´¤vÆF¡A¤Å¥Hµ½¤p¦Ó¤£¬°¡C
ªð¦^¦Cªí ¤W¤@¥DÃD