跳到主要內容

如何在Excel中使用公式突出顯示/條件格式化單元格?

假設您有一個包含常量和公式的大型工作表,現在您想知道所有公式單元格的位置。 當然,您可以使用“轉到特殊位置”功能輕鬆快速地選擇所有公式。 但是,如果需要不時更改數據或公式,則必須重複應用此函數。

在這裡,我向您介紹一個更好的解決方案-條件格式。 使用條件格式設置,您可以用公式突出顯示所有單元格,而且,突出顯示的格式將隨著更改的數據進行調整。

用定義名稱公式和條件格式突出顯示公式單元格

用用戶定義的函數和條件格式突出顯示公式單元格

使用Kutools for Excel快速輕鬆地突出顯示公式單元格


在使用之前 條件格式,您應該創建一個定義的名稱,請執行以下步驟:

1。 打開您的工作表,然後單擊 公式 > 名稱管理員,請參見屏幕截圖:

文檔突出顯示公式1

2。 在彈出 名稱管理員 對話框,單擊 全新 按鈕。

文檔突出顯示公式1

3。 而在中 新名字 對話框中,進行以下操作:

  • (1.)輸入您定義的名稱公式的名稱,在此示例中,我將輸入 格式公式;
  • (2.)選擇 工作簿 從範圍下拉列表中;
  • (3.)輸入這個公式 = GET.CELL(48,INDIRECT(“ rc”,FALSE)) 領域。

文檔突出顯示公式1

4。 然後點擊 OK 返回上一個對話框並關閉它。

5。 然後選擇要突出顯示公式單元格的範圍或整個工作表。

6。 下 首頁 標籤,點擊 條件格式 > 新規則,請參見屏幕截圖:

文檔突出顯示公式1

7。 在 新格式規則 對話框中單擊 使用公式來確定要格式化的單元格 選項,然後輸入此公式 =格式公式 (格式公式 是您在步驟3)中定義的名稱,則可以將其更改為自己的定義名稱。 看截圖:

文檔突出顯示公式1

8。 然後點擊 格式 按鈕,在下面設置格式 標籤,請參見屏幕截圖:

文檔突出顯示公式1

9。 然後點擊 OK > OK 完成操作,所有帶有公式的單元格立即突出顯示,如下所示:

文檔突出顯示公式1

筆記:

1.在“條件格式”涵蓋的任何單元格中輸入公式時,它們將自動突出顯示。

2.完成操作後,您需要將工作簿另存為 Excel啟用宏的工作簿 這樣就可以保存條件格式的單元格。 下次打開工作簿時,請單擊 啟用內容。

文檔突出顯示公式1


如果您不想使用定義的名稱公式,則可以創建一個簡單的用戶定義函數,然後應用條件格式來解決此任務。

1。 首先,按住 ALT + F11 鍵打開 Microsoft Visual Basic for Applications窗口.

2。 點擊 插入 > 模塊,然後將以下較短的代碼粘貼到 模塊窗口.

Function HasFormula(Rng As Range) As Boolean
'Updateby Extendoffice
Application.Volatile
HasFormula = Rng.HasFormula
End Function

3。 然後保存並關閉此代碼,然後返回工作表以選擇要突出顯示公式單元格的範圍或整個工作表。

4。 去 首頁 選項卡,然後單擊 條件格式 > 新規則.

5。 在 新格式規則 對話框中選擇 使用公式來確定要格式化的單元格 選項,然後輸入此公式 = Hasformula(A1),請參見屏幕截圖:

文檔突出顯示公式1

6. 然後點擊 格式 按鈕,然後選擇一種您喜歡的顏色 在標籤 單元格格式 對話框。

7。 然後點擊 OK > OK 關閉對話框。 並且所有包含公式的單元格都立即突出顯示。

筆記:

1.在公式中 A1 表示所選範圍內的第一個單元格,您可以根據需要進行更改。

2.在“條件格式”涵蓋的任何單元格中輸入公式時,它們將自動突出顯示。

3.完成操作後,您需要將工作簿另存為 Excel啟用宏的工作簿 這樣就可以保存條件格式的單元格。 下次打開工作簿時,請單擊 啟用內容.


對於我們的Excel初學者來說,上述兩種方法似乎都有些困難,在這裡,我將推荐一個功能強大的工具- Excel的Kutools,其多功能 工作表設計 功能,您可以快速突出顯示整個工作簿的所有公式。

注意:要應用此 工作表設計,首先,您應該下載 Excel的Kutools,然後快速輕鬆地應用該功能。

安裝後 Excel的Kutools,請這樣做:

1。 打開您要突出顯示所有公式的工作簿。

2。 點擊 Kutools 加 > 工作表設計,和一個新的 設計 標籤將顯示在功能區中,然後單擊 突出顯示公式 在選項 瀏覽 組,請參閱屏幕截圖:

1

3。 整個工作簿中的所有公式均已立即突出顯示。 看截圖:

文檔突出顯示公式1

筆記:

1。 點擊 突出顯示公式 再次,突出顯示將被關閉。

2.您可以通過單擊將突出顯示顏色更改為您喜歡的顏色 設定設計 標籤,然後在 設計工具設置 對話框中,從 公式顏色 部分:

3.在當前工作簿的任何單元格中輸入新公式時,它們將自動突出顯示。

單擊以了解有關此Highlight Formulas實用程序的更多信息。

立即下載和免費試用Excel的Kutools!


Excel的Kutools:具有300多個方便的Excel加載項,可以在30天內免費試用,沒有任何限制。 立即下載並免費試用!

相關文章:

如何在Excel中鎖定和保護公式?

如何隱藏Excel的公式欄中未顯示的公式?

最佳辦公生產力工具

🤖 Kutools 人工智慧助手:基於以下內容徹底改變數據分析: 智慧執行   |  生成代碼  |  建立自訂公式  |  分析數據並產生圖表  |  呼叫 Kutools 函數...
熱門特色: 尋找、突出顯示或識別重複項   |  刪除空白行   |  合併列或儲存格而不遺失數據   |   沒有公式的回合 ...
超級查詢: 多條件VLookup    多值VLookup  |   跨多個工作表的 VLookup   |   模糊查詢 ....
高級下拉列表: 快速建立下拉列表   |  依賴下拉列表   |  多選下拉列表 ....
欄目經理: 新增特定數量的列  |  移動列  |  切換隱藏列的可見性狀態  |  比較範圍和列 ...
特色功能: 網格焦點   |  設計圖   |   大方程式酒吧    工作簿和工作表管理器   |  資源庫 (自動文字)   |  日期選擇器   |  合併工作表   |  加密/解密單元格    按清單發送電子郵件   |  超級濾鏡   |   特殊過濾器 (過濾粗體/斜體/刪除線...)...
前 15 個工具集12 文本 工具 (添加文本, 刪除字符,...)   |   50+ 圖表 類型 (甘特圖,...)   |   40+ 實用 公式 (根據生日計算年齡,...)   |   19 插入 工具 (插入二維碼, 從路徑插入圖片,...)   |   12 轉化 工具 (數字到單詞, 貨幣兌換,...)   |   7 合併與拆分 工具 (高級合併行, 分裂細胞,...)   |   ... 和更多

使用 Kutools for Excel 增強您的 Excel 技能,體驗前所未有的效率。 Kutools for Excel 提供了 300 多種進階功能來提高生產力並節省時間。  點擊此處獲取您最需要的功能...

產品描述


Office選項卡為Office帶來了選項卡式界面,使您的工作更加輕鬆

  • 在Word,Excel,PowerPoint中啟用選項卡式編輯和閱讀,發布者,Access,Visio和Project。
  • 在同一窗口的新選項卡中而不是在新窗口中打開並創建多個文檔。
  • 將您的工作效率提高 50%,每天為您減少數百次鼠標點擊!
Comments (7)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hey,

ik wil een cel, welke een formule heeft, met een kleur aanduiden in functie van een andere cel die een waarde heeft.

vb: als E10<4 dan moet F10 (welke een formule heeft) samen met E10 in een bepaalde kleur komen.

Als ik dit doe, wordt enkel E10 gemarkeerd.


Hoe los Ik dit op?


Mvg
This comment was minimized by the moderator on the site
I was able to follow all the below. I made a macro to do this for me, but it is not able to apply the formatting. My range is named, but how to I ass VBA to highlight the range with formatting. For context, I am highlighting all cells with a formula in it to be a green color. If the formula is typed over it changes colors
This comment was minimized by the moderator on the site
This is exactly what I want to do, and the first stage (highlighting every cell with a formula in) isn't working for me either, despite following steps to the letter. Did you manage to get a solution?
This comment was minimized by the moderator on the site
dear sir, i have a doubt ,for example in a student marks table i want the student names highlited based on the student who got lessthan 400 total marks using conditional formatting.please help me sir
This comment was minimized by the moderator on the site
Hi, How can I highlight cells in a row based on days of a month, for example if I need to highlight cells in increments of 1 day i.e. it should highlight each subsequent cells if 24 hrs has passed,
This comment was minimized by the moderator on the site
Hi, I am trying to do conditional formatting on a cell based on another cell value which already has a formula on it. i have tried everything but i would not work. eg. cell B1 has a formula (A1+1) and i am trying to change the color of say cell D8 by using formula (=B1=21). it works fine when i remove the increment formula from B1 and enter a value manually...
This comment was minimized by the moderator on the site
Thanks for the help. This is the only website where i have found complete steps
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations