- ©«¤l
- 2834
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 2890
- ÂI¦W
- 0
- §@·~¨t²Î
- ¡e²¤¡f
- ³nÅ骩¥»
- ¡e²¤¡f
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¡e²¤¡f
- µù¥U®É¶¡
- 2013-5-13
- ³Ì«áµn¿ý
- 2024-11-23
|
µ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 |
|