![](/img/trans.png)
[英]How to compare to cells and return a particular cell value in the matched row in Excel
[英]How to search for a range of cells in excel for a particular string and return the value of the cell that does not contain that string
我有一行包含一系列“ FALSE”和一個包含國家/地區值(例如“ Australia”)的單元格
如何瀏覽這些單元格並在另一列中返回國家名稱
例如
A1 B1 C1 D1 E1
False False False False Australia
如何通過A1到E1並返回不包含“ False”的單元格的值
我不確定要使用該值做什么,也沒有說明是否會多次出現不包含False的單元格。 但是,如果您在選擇范圍的同時運行宏,則會顯示有關單元格值和范圍的消息
Dim cel As Range
For Each cel in Selection
If cel.value <> “False” then MsgBox cel.value & “ in cell “ & cel.Address
Next cel
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.