![](/img/trans.png)
[英]Check for a specific column name given a string then highlight values in the column that doesn't match given value in VBA
[英]VBA: Highlight a row with a specific column value
我正在處理一個非常大的 excel 2010 工作簿,其中有幾張紙。
其中一張表稱為"RatePlan"
,該表中的一列是"RatePlanCde"
。
其中一些"RatePlanCde"
(共 2514 個)不再有效,並以紅色突出顯示。
我需要查找"RatePlanCde"
列是否存在於任何其他工作表中。 如果是這樣,則在所有工作表中也以紅色突出顯示具有無效"RatePlanCde"
值的行。
這可以使用 VBA 腳本完成嗎?如何完成?
條件格式的公式是一個簡單的VLookup
以下公式假設“其他”表中的代碼在列 A 中,代碼在列 C 中的 Rateplan-Sheet 中,以及列 D 中的“無效”標記:
=VLOOKUP(A2;RatePlan!$C$2:$D2515;2;FALSE)="INVALID"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.