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

VBA ¸ê®Æ·j´M°ÝÃD

VBA¸ê®Æ·j´M°ÝÃD

¥»©«³Ì«á¥Ñ Qin ©ó 2018-10-7 14:35 ½s¿è

¦^´_ 60# ­ã´£³¡ªL

"¤ï¶Õ" °Õ! ¤£¬O¶û³Â·Ð, ¥u¬O¦]¬°²ßºD¨ÏµM.
·í·Q¨ì­ã¤j³£¤£¹½¨ä·Ð, À°§Ú¸Ñ¨M¤@­Ó¤S¤@­Ó°ÝÃD®É.
¤ß¸Ì°£¤F·P®¦ÁÙ¦³, ÁÙ¦³µL­­ªº·P¿E¡K.
¨¥Âk¥¿¶Ç, ¬°¦ó¦b Search Data ªº¹Lµ{¤¤, ¦pªG¤£¶}

SearchData_20181007.rar (943.35 KB)

TOP

¦^´_ 60# ­ã´£³¡ªL

¤£¾å±o¦³¦ó¬G»Ù, ¤@ª½¤£¯à±N¥þ¤å§¹¾ã¶K¤W...

TOP

¦^´_ 60# ­ã´£³¡ªL

¨¥Âk¥¿¶Ç, ¬°¦ó¦b Search Data ªº¹Lµ{¤¤, ¦pªG¤£¥´¶} Data ÀÉ, ´N­n¥Î 1¤ÀÄÁ ªº®É¶¡·j¸ê®Æ,
¦pªG2ÀɦP®É¥´¶}, ¥u»Ý 4¬í-7¬í, ´N¥i¥H·j¨ìµª®×. (40¸Uµ§)

¦]¬°§Úªº¥»·N¬O Search Data ªº¹Lµ{¤¤, Data ÀɬO¤£­n¥´¶}ªº.
¤S­n¦A¦¸³Â·Ð­ã¤jÀ°§Ú¬Ý¬Ý¡K.

p/s:"¤é´Á®æ¦¡"°ÝÃD,¤w§ä¨ì¤F¸Ñ¨Mªº¤èªk.

TOP

¦^´_ 63# Qin


³æ¿W¤â°Ê¥´¶}dataÀÉ, ¬Ý­nªá¦h¤Ö®É¶¡???
¦pªGÀɮפ¤¦³«Ü¦h¤½¦¡, ¶}±Ò®É·|¦Û°Ê­«ºâ, ­nªá¨Ç®É¶¡ªº!

©Ò¿×[¤£¶}±Ò], ¹ê»Ú¬O¥Î§OºØ¤è¦¡¶}±Ò, ¥u¬O¦×²´¬Ý¤£¨ì,
¨S¦³¹ê»ÚÀÉ®×´ú¸Õ, ¤°»ò¤]»¡¤£·Ç!!!
_§Ú¥u¥Îoffice 2000, ©Ò¥H, ¥i¥t¦æµo©«, ½Ð¨ä¥L¤HÀ°¦£§a~~

TOP

¦^´_ 64# ­ã´£³¡ªL

ÁÂÁ§Aªº´£¿ô
­ì¨Ó Data ÀɮפӤj, ¥´¶}®É, »Ý­nªá¤@ÂI®É¶¡¤~¬OÄpµ²©Ò¦b.

²{¦b°ÝÃD¤S¸Ñ¨M¤F,
¦]¬°§Ú±N¥¦Àx¦s¬°(.xlsb)
¦b·j´M³t«×¤W¤]¥O¤Hº¡·N¡K

±µ¤U¨Ó, ÁÙ¥i¥H½Ð§A¦AÀ°§Ú³Ì«á¤@­Ó¦£¶Ü?
§Ú·Q±N·j´M¥X¨Ó¸ê®Æ¥Î VBA ¦A°µ¤@­Ó [²{¦s¼Æ¶q] Qty on Hand
½Ð¬ÝªþÀÉ
SearchData.rar (51.48 KB)

TOP

¦^´_ 65# Qin

Sub Trans_Qty()
Dim R&
With Sheets("Qty on Hand")
     If .FilterMode Then .ShowAllData
     .UsedRange.Offset(1, 0).EntireRow.Delete
End With
R = Cells(Rows.Count, 1).End(xlUp).Row - 7
If R <= 0 Then Exit Sub
With ['Qty on Hand'!A2:I2].Resize(R)
     [A8:I8].Resize(R).Copy .Cells
     .Sort Key1:=.Item(6), Order1:=xlAscending, _
           Key2:=.Item(3), Order1:=xlAscending, Header:=xlNo
End With
With ['Qty on Hand'!I2].Resize(R)
     .Formula = "=IF(F2=F3,""A"",""B"")&TEXT(MID(I1,2,99),""0;-0;0;!0"")+N(H2)"
     .Value = .Value
     .Replace "A*", "", Lookat:=xlPart
     .Replace "B", ""
     .NumberFormatLocal = "#,##0;-#,##0"
End With
Application.Goto ['Qty on Hand'!A2]
End Sub

TOP

µy§ï
Sub Trans_Qty()
Dim R&
With Sheets("Qty on Hand")
     .AutoFilterMode = False
     .UsedRange.Offset(1, 0).EntireRow.Delete
End With
R = Cells(Rows.Count, 1).End(xlUp).Row - 7
If R <= 0 Then Exit Sub
With ['Qty on Hand'!A2:I2].Resize(R)
     [A8:I8].Resize(R).Copy .Cells
     .Sort Key1:=.Item(6), Order1:=xlAscending, _
           Key2:=.Item(3), Order1:=xlAscending, Header:=xlNo
End With
['Qty on Hand'!A1:I1].Resize(R + 1).AutoFilter
With ['Qty on Hand'!I2].Resize(R)
     .NumberFormatLocal = "#,##0;-#,##0"
     '.Formula = "=IF(F2=F3,""A"","""")&TEXT(MID(I1,2,99),""0;-0;0;!0"")+N(H2)" '¤½¦¡(1)
     '.Formula = "=IF(F2=F3,""A"","""")&IF(ROW(A1)=1,0,MID(I1,2,99))+N(H2)"    '¤½¦¡(2)
     .Formula = "=IF(F2=F3,"""",SUMIF(F:F,F2,H:H))"  '¤½¦¡(3)
     '¤TºØ¤½¦¡¥ô¿ï¤@­Ó, ¸ê®Æ¦h, ¬Ý­þ­Ó§Ö, ¿ï­þ­Ó
     .Value = .Value
     .Replace "A*", "", Lookat:=xlPart '¨Ï¥Î¤½¦¡(3), ¥i¬Ù²¤³o¤@¦æ
End With
Application.Goto ['Qty on Hand'!A2]
End Sub

TOP

¦^´_ 67# ­ã´£³¡ªL

­ã¤j
3­Ó¤½¦¡, ¥u¦³¤½¦¡(3)¥i¥Î
¨ä¥L2­Ó¬Ò¥X¿ù.
Formula.rar (108.2 KB)

TOP

¦^´_ 68# Qin

§ó¥¿¤U:
With ['Qty on Hand'!I2].Resize(R)
     .NumberFormatLocal = "#,##0;-#,##0"
     .Formula = "=IF(F2=F3,""A"","""")&TEXT(MID(I1,2,99),""0;-0;0;!0"")*(F2=F1)+N(H2)"  '¤½¦¡(1)
     '.Formula = "=IF(F2=F3,""A"","""")&IF(ROW(A1)=1,0,MID(I1,2,99))*(F2=F1)+N(H2)" '¤½¦¡(2)
     '.Formula = "=IF(F2=F3,"""",SUMIF(F:F,F2,H:H))" '¤½¦¡(3)
     .Value = .Value
     .Replace "A*", "", Lookat:=xlPart '¤½¦¡(1)¤Î(2), »Ý¥[³o¤@¦æ
End With

TOP

¦^´_ 69# ­ã´£³¡ªL

©¯¦n¦³­ã¤j¤£Â_ªºÀ°¦£, ²Å¦X§Ú»Ý¨Dªºµ{¦¡½X²×©ó¥i¥H¨Ï¥Î¤F¡K
ÁÂÁ§A,·í§Ú»¡¸ê®Æ¤Ó¤j, ·j´M³t«×ºC®É, ¤SÀ°§Ú­«·s¼g¹L¤@½gµ{¦¡½X.
ÁÂÁ§A,¸ò¾Ú§Úªº­n¨DÀ°§Ú­×­×§ï§ï, Åý¥¦¾A¦X§Ú¨Ï¥Î.
ÁÂÁ§A,Á`¦b§Ú¹J¨ì°ÝÃD§ä¤£¨ì­ì¦]®É, ¤´Ä@·N¦hºV´X­Ó¦rµ¹¤©«ü¥Ü©M´£¿ô.
§A¯uªº«Ü´Î«Ü´Î
ÁÙ¦³¯uªº¯uªº¯uªº«Ü¦n¡K

­ã¤j, ÁÂÁ§A!!!





                   **¾Ç¦Ó¤£¹½  »£¤H¤£­Â**

TOP

        ÀR«ä¦Û¦b : ¦a¤WºØ¤Fµæ¡A´N¤£©öªø¯ó¡F¤ß¤¤¦³µ½¡A´N¤£©ö¥Í´c¡C
ªð¦^¦Cªí ¤W¤@¥DÃD