跳到主要内容

如何在Excel中将单元格值设置为红色(如果为负)和绿色(如果为正)?

现在,如果工作表中有一长串数字,您希望将负值格式化为红色字体,将正值格式化为绿色字体,以便于查看。 在Excel中,有一些方法可以快速轻松地处理此工作。

使用格式化单元格功能将单元格值格式化为负(如果为负),绿色为正(如果为正)

使用 Kutools AI Aide 将单元格值格式化为红色(如果为负)和绿色(如果为正)

使用条件格式设置功能将单元格值格式化为红色(如果为负)和绿色(如果为正)


使用格式化单元格功能将单元格值格式化为负(如果为负),绿色为正(如果为正)

单元格格式 Excel中的函数可以帮助您根据正数或负数将值格式化为特定颜色,请执行以下操作:

1。 选择要使用的单元格列表,然后右键单击以选择 单元格格式 从上下文菜单中,查看屏幕截图:

2。 在 单元格格式 对话框,单击 定制版 来自 产品分类 列表窗格,然后输入 [绿色]常规; [红色]常规; 0Type 文本框,请参见屏幕截图:

备注: 总类 表示正数, -一般 表示负数, [绿色], [红] 是所需的字体颜色,您可以根据需要更改字体颜色。 例如,您可以使用[蓝色],[黄色]等。

3。 然后点击 OK 按钮,负数格式为红色字体,正数更改为绿色字体,请参见屏幕截图:


使用 Kutools AI Aide 将单元格值格式化为红色(如果为负)和绿色(如果为正)

增强您的 Excel 体验 Kutools for Excel's 人工智能助手。只需几个简单的步骤,即可自动将负数格式化为红色,将正数格式化为绿色,从而提供一种清晰有效的方法来区分数据值。立即体验使用 Kutools for Excel 进行数据分析的简单性和效率!

备注: 要使用这个 Kutools 人工智能助手 of Kutools for Excel下载并安装 Kutools for Excel 第一。

安装 Kutools for Excel 后,请单击 Kutools人工智能 > 人工智能助手 打开 Kutools 人工智能助手 窗格:

  1. 选择数据列表,然后在聊天框中输入您的需求,然后单击 提交 按钮或按下 输入 发送问题的键;
  2. 分析完后点击 执行 按钮运行。 Kutools AI Aide 将使用 AI 处理您的请求并直接在 Excel 中返​​回结果。


使用条件格式设置功能将单元格值格式化为红色(如果为负)和绿色(如果为正)

在Excel中,要解决此任务, 条件格式 也可以帮您一个忙,请按照以下步骤操作:

1。 选择您要使用的数字,然后单击 主页 > 条件格式 > 比...更棒,请参见屏幕截图:

2。 在 比...更棒 框中输入 0 进入文本框,然后选择 自订格式 从下拉列表中,查看屏幕截图:

3。 然后,在弹出 单元格格式 对话框,单击 字体 标签,然后选择您要使用的一种颜色,请参见屏幕截图:

4。 然后,单击 OK 按钮,然后关闭 比...更棒 框,正数已格式化为您喜欢的特定字体颜色。

5。 然后,请继续点击 主页 > 条件格式 > 少于少于 框中输入 0 进入文本框,然后选择 红色文字 从下拉列表中,查看屏幕截图:

6。 并且所有负数都立即被格式化为红色字体。


更多相对数字格式文章:

  • 在Excel中以数千,数百万或十亿格式设置数字
  • 假设您有一个大数字列表,现在,您想要将它们格式化为数千,数百万或数十亿,以使它们看起来简洁明了,如下面的屏幕截图所示。 本文,我将讨论如何在Excel中快速格式化成千上万的数字。
  • 在Excel中将数字格式设置为序数(1st 2nd 3rd)
  • 在某些情况下,当我们按以下屏幕截图所示进行排名时,我们需要将数字格式设置为1st,2nd,3rd等。 但是,您知道如何在Excel中将这些基数格式化为序数吗? 通常,在Excel中没有将数字转换为1st的内置函数,但是,在这里,我可以介绍一些有关此问题的技巧。
  • 应用数据验证以强制Excel中的电话号码格式
  • 可能是,在Excel工作簿中键入时,可以使用多种电话号码格式。 但是,如何只允许在工作表的一栏中输入一种电话号码格式? 例如,我只希望允许将此格式为123-456-7890的电话号码输入工作表中。

  • 超级公式栏 (轻松编辑多行文本和公式); 阅读视图 (轻松读取和编辑大量单元格); 粘贴到过滤范围...
  • 合并单元格/行/列 和保存数据; 拆分单元格内容; 合并重复的行和总和/平均值...防止细胞重复; 比较范围...
  • 选择重复或唯一 行; 选择空白行 (所有单元格都是空的); 超级查找和模糊查找 在许多工作簿中; 随机选择...
  • 确切的副本 多个单元格,无需更改公式参考; 自动创建参考 到多张纸; 插入项目符号,复选框等...
  • 收藏并快速插入公式,范围,图表和图片; 加密单元 带密码 创建邮件列表 并发送电子邮件...
  • 提取文字,添加文本,按位置删除, 删除空间; 创建和打印分页小计; 在单元格内容和注释之间转换...
  • 超级筛选 (将过滤方案保存并应用于其他工作表); 高级排序 按月/周/日,频率及更多; 特殊过滤器 用粗体,斜体...
  • 结合工作簿和工作表; 根据关键列合并表; 将数据分割成多个工作表; 批量转换xls,xlsx和PDF...
  • 数据透视表分组依据 周号,周几等 显示未锁定的单元格 用不同的颜色 突出显示具有公式/名称的单元格...
kte选项卡201905
  • 在Word,Excel,PowerPoint中启用选项卡式编辑和阅读,发布者,Access,Visio和Project。
  • 在同一窗口的新选项卡中而不是在新窗口中打开并创建多个文档。
  • 每天将您的工作效率提高50%,并减少数百次鼠标单击!
officetab底部
Comments (12)
Rated 5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
C'est super bien expliqué, merci bcp!
This comment was minimized by the moderator on the site
IGNORE MY COMMENT, I WAS NOT PAYING ATTENTION TO THE CONDITIONAL FORMATTING BIT... This is bloody brilliant! thank you
Rated 5 out of 5
This comment was minimized by the moderator on the site
HI all,
This is brilliant, however, i had the format as accounting or currency, but now, with the above formula for pos and neg, it gets rid of the accounting as part of the format and just goes back to normal.
any suggestions that i can type in along with the [Color10]General;[Red]-General;0 in order to still make it work with accounting/currency?
thanks :)
Rated 5 out of 5
This comment was minimized by the moderator on the site
I formatted the cells to be currency with negatives in red with parenthesis, utilizing the basic settings under Currency tab on Format Cells screen. Then I went to Custom tab at bottom of Format box, and it shows the custom formula for what you've chosen. Simply type [Green] or [Color10] at the very beginning of the custom box under "Type", no spaces, and your positive values should now display green with currency formatting.
This comment was minimized by the moderator on the site
Hejsa

er det muligt at formatere, så hvis A3 bliver grøn så bliver A1 også grøn???
This comment was minimized by the moderator on the site
Er det muligt, at formatere, så hvis jeg gør A3 grøn så bliver A1 automatisk grøn?
This comment was minimized by the moderator on the site
Dear Team , same row two cell values are same displayed OK Button and Next Cell Green Indicator other wise displayed in RED Indictor 
This comment was minimized by the moderator on the site
In LibreOffice I found [color10] was blue and [color3] is a darker green
This comment was minimized by the moderator on the site
how can you get a darker color GREEN...the default is fluorescent and hard to see for older eyes!
This comment was minimized by the moderator on the site
Instead of Green use words color10 ... you will get your required green colorand not the fluroscent one
This comment was minimized by the moderator on the site
Thank you! I was looking for this!
This comment was minimized by the moderator on the site
Thanks this helps me too
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations