如何在Google表格的合并函数中调用单元格的数值?

huangapple go评论96阅读模式
英文:

How to call cell value within concatenate function in google sheets?

问题

I have prepared a sheet pic attached

In cell B1, enter a formula

>0

In cell CF2, entered a formula

=IFS(B1<>"" , " AND Col21  "&B1&" " , B1 = "", "")

and the result is AND Col21 >0

In cell CD2, I have entered the formula

=IFS(CONCATENATE( CA2, "1")<>"" , " AND "&CC2&"  "&CONCATENATE( CA2, "1")&" " , CONCATENATE( CA2, "1") = "", "")

and the output is AND Col21 B1

But, I want to be desired output as AND Col21 >0

In other words, I need to call the value of the cell B1 instead of the Name B1.

英文:

I have prepared a sheet pic attached

In cell B1, enter a formula

&gt;0

In the cell CF2, entered a formula

=IFS(B1&lt;&gt;&quot;&quot;, &quot; AND Col21  &quot;&amp;B1&amp;&quot; &quot; , B1 = &quot;&quot;, &quot;&quot;)

and the result is AND Col21 >0

In cell CD2, I have entered the formula

=IFS(CONCATENATE( CA2, &quot;1&quot;)&lt;&gt;&quot;&quot;, &quot; AND &quot;&amp;CC2&amp;&quot;  &quot;&amp;CONCATENATE( CA2, &quot;1&quot;)&amp;&quot; &quot; , CONCATENATE( CA2, &quot;1&quot;) = &quot;&quot;, &quot;&quot;)

and the output is AND Col21 B1

But, I want to be desired output as AND Col21 >0

In other words, I need to call the value of the cell B1 instead of the Name B1.

答案1

得分: 2

=你可以尝试在公式的CONCATENATE部分内使用[INDIRECT()]函数*

=let(cell_,indirect(CA2&amp;&quot;1&quot;),
     ifs(cell_&lt;&gt;&quot;&quot;, &quot; AND &quot;&amp;CC2&amp;&quot;  &quot;&amp;cell_&amp;&quot; &quot; , cell_=&quot;&quot;,&quot;&quot;))
英文:

<!-- language-all: js -->

You may try n' wrap the CONCATENATE part of the formula within INDIRECT()

=let(cell_,indirect(CA2&amp;&quot;1&quot;),
     ifs(cell_&lt;&gt;&quot;&quot;, &quot; AND &quot;&amp;CC2&amp;&quot;  &quot;&amp;cell_&amp;&quot; &quot; , cell_=&quot;&quot;,&quot;&quot;))

huangapple
  • 本文由 发表于 2023年7月4日 21:44:22
  • 转载请务必保留本文链接:https://go.coder-hub.com/76613277.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定