跳到主要內容

如何在Excel中將單元格值設置為紅色(如果為負)和綠色(如果為正)?

現在,如果工作表中有一長串數字,您希望將負值格式化為紅色字體,將正值格式化為綠色字體,以便於查看。 在Excel中,有一些方法可以快速輕鬆地處理此工作。

使用格式化單元格功能將單元格值格式化為負(如果為負),綠色為正(如果為正)

使用 Kutools AI Aide 將儲存格值格式化為紅色(如果為負值)和綠色(如果為正)

使用條件格式設置功能將單元格值格式化為紅色(如果為負)和綠色(如果為正)


使用格式化單元格功能將單元格值格式化為負(如果為負),綠色為正(如果為正)

單元格格式 Excel中的函數可以幫助您根據正數或負數將值格式化為特定顏色,請執行以下操作:

1。 選擇要使用的單元格列表,然後右鍵單擊以選擇 單元格格式 從上下文菜單中,查看屏幕截圖:

2。 在 單元格格式 對話框,單擊 習俗 來自 類別 列表窗格,然後輸入 [綠色]常規; [紅色]常規; 0類別 文本框,請參見屏幕截圖:

備註: 表示正數, -一般 表示負數, [綠色], [紅] 是您想要的字體顏色,您可以根據需要更改字體顏色。 例如,您可以使用[藍色],[黃色]等。

3。 然後點擊 OK 按鈕,負數格式為紅色字體,正數更改為綠色字體,請參見屏幕截圖:


使用 Kutools AI Aide 將儲存格值格式化為紅色(如果為負值)和綠色(如果為正)

增強您的 Excel 體驗 Excel的Kutools's 人工智慧助手。只需幾個簡單的步驟,即可自動將負數格式化為紅色,將正數格式化為綠色,從而提供一種清晰有效的方法來區分資料值。立即體驗使用 Kutools for Excel 進行資料分析的簡單性和效率!

備註: 要使用這個 Kutools 人工智慧助手 of Excel的Kutools下載並安裝 Kutools for Excel 第一。

安裝Kutools for Excel之後,請點擊 Kutools人工智慧 > 人工智慧助手 打開 Kutools 人工智慧助手 窗格:

  1. 選擇資料列表,然後在聊天框中輸入您的需求,然後按一下 送出 按鈕或按下 Enter 發送問題的按鍵;
  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