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

[µo°Ý] ®Ú¾Ú¦h±ø¥ó¿z¿ï²M³æ

[µo°Ý] ®Ú¾Ú¦h±ø¥ó¿z¿ï²M³æ



1. ®Ú¾Ú Shop ©M Code ¿z¿ï¦³Ãö Date ªº©Ò¦³²M³æ¡C
2. ¬d¥X¤F Date ªº©Ò¦³²M³æ«á¡A¿ï¾Ü¨ä¤¤¤@­Ó¤é´Á¦Ó§ä¥X Amount ª÷ÃB¡C
ÁÂÁ¡I


book1.rar (16.39 KB)

¦^´_ 1# maiko

­è¤£¤[«e¡A§Ú§@¤F¤@­ÓÃþ¦üªº¡A­×§ï¤F¤@¤U¡A¤]¤£ª¾¬O¤£¬OÀ³§Aªº­n¨D¡I
  1. Private Sub Worksheet_Change(ByVal Target As Range)
  2. If Target.Address = [k3].Address Then
  3.         Range("B2:G" & Cells(Rows.Count, 2).End(xlUp).Row).AutoFilter
  4.         ActiveWorkbook.Worksheets("¤u§@ªí1").AutoFilter.Sort.SortFields.Clear
  5.         ActiveWorkbook.Worksheets("¤u§@ªí1").AutoFilter.Sort.SortFields.Add Key:=Range( _
  6.             "B2:B" & Cells(Rows.Count, 2).End(xlUp).Row), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
  7.             xlSortNormal
  8.         With ActiveWorkbook.Worksheets("¤u§@ªí1").AutoFilter.Sort
  9.             .Header = xlYes
  10.             .MatchCase = False
  11.             .Orientation = xlTopToBottom
  12.             .SortMethod = xlPinYin
  13.             .Apply
  14.         End With
  15.         Range("B2:G" & Cells(Rows.Count, 2).End(xlUp).Row).AutoFilter
  16.         
  17.     shop = [k3]
  18.     For Each Rng In Range("B2:B" & Cells(Rows.Count, 2).End(xlUp).Row)
  19.         If Rng = shop Then
  20.             K = K + 1
  21.             If K = 1 Then
  22.                 Set Rn = Rng.Offset(0, 1)
  23.             Else
  24.                 Set Rn = Union(Rn, Rng.Offset(0, 1))
  25.             End If
  26.         End If
  27.     Next
  28.     aa = Rn.Address
  29.     If aa = "" Then
  30.         Exit Sub
  31.     Else
  32.         With [L3].Validation
  33.             .Delete
  34.             .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:="=" & aa
  35.             .IgnoreBlank = True
  36.             .InCellDropdown = True
  37.             .InputTitle = ""
  38.             .ErrorTitle = ""
  39.             .InputMessage = ""
  40.             .ErrorMessage = ""
  41.             .IMEMode = xlIMEModeNoControl
  42.             .ShowInput = True
  43.             .ShowError = False
  44.         End With
  45.     End If
  46.     [L3] = "½Ð¿ï¾Ü¤é´Á"
  47. End If
  48. If Target.Address = [L3].Address Then
  49.     For Each Rang In Range("B2:B" & Cells(Rows.Count, 2).End(xlUp).Row)
  50.         If Rang = [k3] And Rang.Offset(0, 1) = [L3] Then
  51.             [K5] = Rang.Offset(0, 2)
  52.             [L5] = Rang.Offset(0, 5)
  53.             End
  54.         End If
  55.     Next
  56. End If
  57. End Sub
½Æ»s¥N½X

TOP

¦^´_ 1# maiko

¶¶«K´£¤@¤U¡A¸ê®ÆÅçÃÒ²M³æ¥²¶·¬O³sÄòªºÀx¦s®æ¡A©Ò¥H§Úµ{§Ç¤¤¦³°µ±Æ§Çªº°Ê§@

TOP

¦^´_  maiko

­è¤£¤[«e¡A§Ú§@¤F¤@­ÓÃþ¦üªº¡A­×§ï¤F¤@¤U¡A¤]¤£ª¾¬O¤£¬OÀ³§Aªº­n¨D¡I
lpk187 µoªí©ó 2015-4-17 18:16



    §Ú©ñ¤F³o¬q½s½X¡A¥i¬O¨S¤ÏÀ³¡A¤£ª¾¹D¬O­þ¸Ì¦³°ÝÃD?

TOP

¦^´_ 4# maiko


   ³o¬O¤u§@ªíªº¨Æ¥óµ{§Ç¡A©Ò¥H§A¥²¶·¶K¦b¤u§@ªí1ªºµ{§Ç¤¤

TOP

¥»©«³Ì«á¥Ñ lpk187 ©ó 2015-4-17 19:51 ½s¿è

¦^´_ 4# maiko
¦b¤u§@ªí1ªº¼ÐÅÒ¤W«ö¥kÁä¿ï¾ÜÀ˵øµ{¦¡½X

µM«á¦b½s¿è°Ï¶K¤W¥N½X´N¦æ¤F

1¡C¶K¤W«á¡A¥u­n§A¦b"K3"Àx¦s®æÁä¤J§Aªºshop¡A¤é´ÁÄ檺²M³æ´N·|§ïÅÜ¡A
2¡C§ïÅܤé´Á²M³æ«á¡A¥u­n§A§ïÅܤé´Á²M³æªº¸ê®Æ¡A´N·|±o¨ì§A­nªºµª®×

TOP

¦^´_ 4# maiko


    aaa.rar (21.21 KB)

TOP

¦^´_  maiko
lpk187 µoªí©ó 2015-4-17 19:53



    ¤£¦n·N«ä¡A§Úªº­ì·N¬O¥ý¦³ Shop ©M Code ³o¨â­Ó±ø¥ó¡AµM«á¿z¿ï¥X Date¡A¦³¤F Date ¤§«á¤~¦³ Amount¡AÁÂÁ¡I

TOP

¦^´_ 8# maiko


    ¤£¦n·N«ä¡A»~·|§Aªº·N«ä¡A¤£¹L§A¤´¥i¥H­×§ï¨ä¤¤ªº§PÂ_´N¥i¥H¹F¨ì§A­nªºªF¦è¤F¡I

TOP

¦^´_  maiko


    ¤£¦n·N«ä¡A»~·|§Aªº·N«ä¡A¤£¹L§A¤´¥i¥H­×§ï¨ä¤¤ªº§PÂ_´N¥i¥H¹F¨ì§A­nªºªF¦è¤F¡I
lpk187 µoªí©ó 2015-4-18 08:43



    ¦n§a¡A¸Õ¸Õ¬Ý¡A¦³¤£©ú¥Õ¦A°Ý§A¡A¦n¶Ü?

TOP

        ÀR«ä¦Û¦b : ¤@¥y·Å·xªº¸Ü¡A´N¹³©¹§O¤H¨­¤WÅx­»¤ô¡A¦Û¤v·|ªg¨ì¨â¤Tºw¡C
ªð¦^¦Cªí ¤W¤@¥DÃD