用excel VBA 檢查H-V欄的每個單元格是否包含B欄中的任何內容,如果包含,則將該單元格的文字和對應B欄的文字顏色設為紅色
- User
用excel VBA 檢查H-V欄的每個單元格是否包含B欄中的任何內容,如果包含,則將該單元格的文字和對應B欄的文字顏色設為紅色
Assistant
你可以使用Excel VBA的
Like運算符或InStr函數來檢查單元格是否包含特定的文本。以下是一個範例程式碼,用於檢查H-V欄的每個單元格是否包含B欄中的任何內容,如果包含,則將該單元格的文字和對應B欄的文字顏色設為紅色:vba
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.