- ©«¤l
- 2
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 50
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- SP1
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2014-4-2
- ³Ì«áµn¿ý
- 2023-4-15
|
[µo°Ý] ½Ð¦U¦ì°ª¤â½ç±Ð,¦p¦ó¥i¥H¼g±o²µu¨Ç
½Ð¦U¦ì°ª¤â½ç±Ð,µ{¦¡¦p¤U- Sub sort_weight()
- '
- ' sort_weight Macro
- '
- '
- Range("C2:E2").Select
- Range(Selection, Selection.End(xlDown)).Select
- Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlGreater, _
- Formula1:="=300.1"
- Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
- With Selection.FormatConditions(1).Font
- .Color = -16383844
- .TintAndShade = 0
- End With
- With Selection.FormatConditions(1).Interior
- .PatternColorIndex = xlAutomatic
- .Color = 13551615
- .TintAndShade = 0
- End With
- Selection.FormatConditions(1).StopIfTrue = False
- Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlBetween, _
- Formula1:="=180.1", Formula2:="=300"
- Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
- With Selection.FormatConditions(1).Font
- .Color = -16752384
- .TintAndShade = 0
- End With
- With Selection.FormatConditions(1).Interior
- .PatternColorIndex = xlAutomatic
- .Color = 13561798
- .TintAndShade = 0
- End With
- Selection.FormatConditions(1).StopIfTrue = False
- Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlBetween, _
- Formula1:="=120.1", Formula2:="=180"
- Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
- With Selection.FormatConditions(1).Font
- .Color = -16751204
- .TintAndShade = 0
- End With
- With Selection.FormatConditions(1).Interior
- .PatternColorIndex = xlAutomatic
- .Color = 10284031
- .TintAndShade = 0
- End With
- Selection.FormatConditions(1).StopIfTrue = False
- Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlBetween, _
- Formula1:="=2", Formula2:="=3"
- Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
- With Selection.FormatConditions(1).Font
- .Color = -16752384
- .TintAndShade = 0
- End With
- With Selection.FormatConditions(1).Interior
- .PatternColorIndex = xlAutomatic
- .Color = 13561798
- .TintAndShade = 0
- End With
- Selection.FormatConditions(1).StopIfTrue = False
- Range("D2").Select
- Range(Selection, Selection.End(xlDown)).Select
- ActiveWorkbook.Worksheets("shipment detail").Sort.SortFields.Clear
- ActiveWorkbook.Worksheets("shipment detail").Sort.SortFields.Add Key:=Range( _
- "D2"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
- xlSortNormal
- With ActiveWorkbook.Worksheets("shipment detail").Sort
- .SetRange Range("A2:Q41")
- .Header = xlNo
- .MatchCase = False
- .Orientation = xlTopToBottom
- .SortMethod = xlPinYin
- .Apply
- End With
- Range("F2").Select
- Range(Selection, Selection.End(xlToRight)).Select
- Range(Selection, Selection.End(xlDown)).Select
- [color=Red]Selection.FormatConditions.Add Type:=xlTextString, String:="NET-A-PORTER", _
- TextOperator:=xlContains
- Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
- With Selection.FormatConditions(1).Font
- .Color = -16383844
- .TintAndShade = 0
- End With
- With Selection.FormatConditions(1).Interior
- .PatternColorIndex = xlAutomatic
- .Color = 13551615
- .TintAndShade = 0
- End With
- Selection.FormatConditions(1).StopIfTrue = False
- Selection.FormatConditions.Add Type:=xlTextString, String:="NET A PORTER", _
- TextOperator:=xlContains
- Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
- With Selection.FormatConditions(1).Font
- .Color = -16383844
- .TintAndShade = 0
- End With
- With Selection.FormatConditions(1).Interior
- .PatternColorIndex = xlAutomatic
- .Color = 13551615
- .TintAndShade = 0
- End With
- Selection.FormatConditions(1).StopIfTrue = False
- Selection.FormatConditions.Add Type:=xlTextString, String:="INTERLINK", _
- TextOperator:=xlContains
- Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
- With Selection.FormatConditions(1).Font
- .Color = -16383844
- .TintAndShade = 0
- End With
- With Selection.FormatConditions(1).Interior
- .PatternColorIndex = xlAutomatic
- .Color = 13551615
- .TintAndShade = 0
- End With
- Selection.FormatConditions(1).StopIfTrue = False
- Selection.FormatConditions.Add Type:=xlTextString, String:="39 TSING YI", _
- TextOperator:=xlContains
- Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
- With Selection.FormatConditions(1).Font
- .Color = -16383844
- .TintAndShade = 0
- End With
- With Selection.FormatConditions(1).Interior
- .PatternColorIndex = xlAutomatic
- .Color = 13551615
- .TintAndShade = 0
- End With
- Selection.FormatConditions(1).StopIfTrue = False[/color]End Sub
½Æ»s¥N½X ½Ð¦U¦ì¤j¤jÀ°¦£¸Ñ´b¡A·PÁ¡I |
|