- ©«¤l
- 4
- ¥DÃD
- 2
- ºëµØ
- 0
- ¿n¤À
- 6
- ÂI¦W
- 0
- §@·~¨t²Î
- windows8.1
- ³nÅ骩¥»
- office2007
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2015-2-6
- ³Ì«áµn¿ý
- 2015-3-19
|
[µo°Ý] ¤£ª¾µo¥Í¥X¤F¬Æ»òª¬ªp¡AÁٽЦU¦ì¤j¤jµ¹¤©¨ó§U
¥H¤Uµ{¦¡¤£ª¾¥X¤F¬Æ»òª¬ªp¡AÁٽЦU¦ì¤j¤j¨ó§U±Æ°£
Private Sub Worksheet_Change(ByVal TARGET As Range)
Dim i As Long
i = 3
Do While Cells(i, "A") <> Sheets("®w¦sÁ`ªí").[B2:B65536]
With TARGET
'If .Row >= 1 And .Column = 1 Then
.Offset(0, 2) = Application.VLookup(.Value, Sheets("®w¦sÁ`ªí").[B2:K65536], 3, False)
.Offset(0, 3) = Application.VLookup(.Value, Sheets("®w¦sÁ`ªí").[B2:K65536], 4, False)
.Offset(0, 4) = Application.VLookup(.Value, Sheets("BOM").[A2:K65536], 5, False)
.Offset(0, 5) = Application.VLookup(.Value, Sheets("BOM").[A2:K65536], 5, False) * Range("B1")
.Offset(0, 6) = Application.VLookup(.Value, Sheets("®w¦sÁ`ªí").[B2:K65536], 5, False)
.Offset(0, 7) = Application.VLookup(.Value, Sheets("®w¦sÁ`ªí").[B2:K65536], 5, False) _
- Application.VLookup(.Value, Sheets("BOM").[A2:K65536], 5, False) * Range("B1")
.Offset(0, 8) = Application.VLookup(.Value, Sheets("®w¦sÁ`ªí").[B2:K65536], 8, False)
If .Offset(0, 7) < Application.VLookup(.Value, Sheets("®w¦sÁ`ªí").[B2:K65536], 8, False) Then
.Offset(0, 7).Font.Color = RGB(255, 0, 0)
Else
.Offset(0, 7).Font.Color = RGB(0, 0, 0)
End If
End With
i = i + 1
Loop
End Sub
°õ¦æ®É¦b²Ä¤T¦æ¥X²{«¬ºA¤£²Å¦Xªº¿ù»~°T®§µøµ¡¡A¦Ê«ä¤£±o¨ä¸Ñ
Á٧Ʊæ¦U¦ì¤j¤j¯à¨ó§U½T»{
ÁÂÁÂ |
|