根据公式指定的格式
可以将 STYLE() 函数添加到单元格的现有公式中。例如,与 CURRENT 函数一起使用时,您可以根据其值来为单元格上色。对于公式 =...+STYLE(IF(CURRENT()>3; "Red"; "Green")),如果值大于 3,则为单元格应用单元格样式“红色”,否则将应用单元格样式“绿色”。
如果希望选定区域中的所有单元格都应用某个公式,您可以使用
对话框。-
选出所有您需要的单元格。
-
选择菜单命令编辑 - 查找和替换。
-
For the *
term, enter: .".*" 是一种常规表达式,指代当前单元格中的内容。
-
Enter the following formula in the =&+STYLE(IF(CURRENT()>3;"Red";"Green"))
field:The "&" symbol designates the current contents of the Find field. The line must begin with an equal sign, since it is a formula. It is assumed that the cell styles "Red" and "Green" already exist.
-
选中正则表达式和仅在当前选定范围内字段。单击查找全部。
选择中所有带内容的单元格被突出显示。
-
单击
。