[英]Copy the value in a range of cells to another cell if only one cell in the range has a value
[英]How to copy the value in a range of cells to another cell if only one cell in the range has a value?
我在Excel電子表格中有40列和幾百行。
Range C6:AQ6, C7:AQ7, C8:AQ8, and so on
CASE 1: Only one cell in the range D6:AQ6 usually contains a value.
CASE 2: In some rare cases, more than one cell OR no cells contain a value in this range.
這是我要完成的工作:
If CASE 1: Populate the cell C6 with the value in the only cell in the range D6:AQ6.
If CASE 2: Leave C6 blank
如何使用Excel公式執行此操作?
在單元格C6中輸入以下公式:
=IF(COUNTA(D6:AQ6)=1,INDEX(D6:AQ6,Match("*",D6:AQ6,0)),"")
這個怎么運作:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.