在其他公式中查找特定元素
Finding a Specific Element Inside Other Formulas
我需要帮助编写一个函数来查找“Th+4”并忽略所有其他附加的化学元素。
数据示例;
/HASr+(aq) 1.2595E-12
Sr+2 2.9449E-06
SrCl+ 1.4637E-10
SrCO3 (aq) 1.01E-10
SrF+ 2.1778E-11
SrHCO3+ 3.2969E-09
如何只找到 Sr+2 而忽略所有其他的?现在,我正在使用这个函数来查找它,但它显示了所有包含 Sr2+.
的元素
=IF(ISERROR(FIND("Sr+2",A7,1)),B7,"")
请帮忙,
谢谢!
你的问题很含糊,但我假设当你"locate"你的值时,你想要return右边的值。
您可以使用 Index()
和 Match()
为您完成此操作。
假设您的查找范围是 A 列,return 的值是 B 列,这应该有效:
=INDEX(A:B,MATCH("Sr+2", A:A),2)
Breaking Down the Formula
Index()
- A:B
is the entire range to index. Your lookup value is column A, and your return value is column B
- Match()
is returning the row number, which we will show that below.
- 2
is column to cross reference the return value of the row from Match()
. Since Match()
gives us the row #, this gives us the column number to "pin-point" the return value
Match()
- "Sr+2"
is the string to be searched for
- A:A
is the location to search for this string.
This returns the row to your Index()
function
使用 Index()
和 Match()
的另一种方法是使用 VLOOKUP()
。这个函数本质上结合了前面两个函数,在你的案例中出于相同的目的。
=VLOOKUP("Sr+2",A:B,2)
Using the VLOOKUP()
Function
Use VLOOKUP, one of the lookup and reference functions, when you need to find things in a table or a range by row. For example, look up a price of an automotive part by the part number.
In its simplest form, the VLOOKUP function says:
=VLOOKUP(Value you want to look up, range where you want to lookup the value, the column number in the range containing the return value, Exact Match or Approximate Match – indicated as 0/FALSE or 1/TRUE).
我还发现这对我的问题有效;
=IF((EXACT($AG,A7)),B7,"")
感谢您的所有回答:)!
祝你有愉快的一天!
我需要帮助编写一个函数来查找“Th+4”并忽略所有其他附加的化学元素。
数据示例;
/HASr+(aq) 1.2595E-12
Sr+2 2.9449E-06
SrCl+ 1.4637E-10
SrCO3 (aq) 1.01E-10
SrF+ 2.1778E-11
SrHCO3+ 3.2969E-09
如何只找到 Sr+2 而忽略所有其他的?现在,我正在使用这个函数来查找它,但它显示了所有包含 Sr2+.
的元素=IF(ISERROR(FIND("Sr+2",A7,1)),B7,"")
请帮忙, 谢谢!
你的问题很含糊,但我假设当你"locate"你的值时,你想要return右边的值。
您可以使用 Index()
和 Match()
为您完成此操作。
假设您的查找范围是 A 列,return 的值是 B 列,这应该有效:
=INDEX(A:B,MATCH("Sr+2", A:A),2)
Breaking Down the Formula
Index()
-A:B
is the entire range to index. Your lookup value is column A, and your return value is column B
-Match()
is returning the row number, which we will show that below.
-2
is column to cross reference the return value of the row fromMatch()
. SinceMatch()
gives us the row #, this gives us the column number to "pin-point" the return value
Match()
-"Sr+2"
is the string to be searched for
-A:A
is the location to search for this string.
This returns the row to yourIndex()
function
使用 Index()
和 Match()
的另一种方法是使用 VLOOKUP()
。这个函数本质上结合了前面两个函数,在你的案例中出于相同的目的。
=VLOOKUP("Sr+2",A:B,2)
Using the
VLOOKUP()
FunctionUse VLOOKUP, one of the lookup and reference functions, when you need to find things in a table or a range by row. For example, look up a price of an automotive part by the part number.
In its simplest form, the VLOOKUP function says:
=VLOOKUP(Value you want to look up, range where you want to lookup the value, the column number in the range containing the return value, Exact Match or Approximate Match – indicated as 0/FALSE or 1/TRUE).
我还发现这对我的问题有效;
=IF((EXACT($AG,A7)),B7,"")
感谢您的所有回答:)!
祝你有愉快的一天!