为了节约大家的流量,什么也不多说,直接上效果,只能说这个在职场很有用 优点:1,
关注小编,每日分享办公 技巧 制作步骤1,新建EXCEL工作表,另存为启用宏的工作表样式, 制作步骤2,在B1单元格设计数值调节阀,直接上图 制作步骤3,按alt F11进入VBA编辑页面,而后双击sheet1,将制作的代码,复制到VBA编辑窗口,而后修改颜色调节的单元格, 代码 Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) If Target.Row >= 6 Then On Error Resume Next [ChangColor_With1].FormatConditions.Delete Target.EntireRow.Name = 'ChangColor_With1' With [ChangColor_With1].FormatConditions .Delete .Add xlExpression, , 'TRUE' .Item(1).Interior.ColorIndex = Range('B1').Value .Item(1).Font.ColorIndex = 5 End With End If End Sub 特别提示: .Item(1).Interior.ColorIndex = Range('B1').Value这句,B1就是存放颜色的地方,亲可以自行修改为数值调节阀对应的单元格,这个在办公职场中,很实用! |
|