2016-06-08 72 views
0

我有数据有空和不同的值。我想要写一个检查行的公式,如果行的所有值均为NULL应该给结果1否则为0。谁能帮助编写公式如何编写excel公式检查行并返回一个值?

+0

'= 1 *(COUNTA(A1:Z1)= 0)' –

+0

仅当单元格为真时为空,且不为单元格中的公式结果时,上述操作才有效。如果单元格有公式,那么将需要一个不同的公式。 –

回答

0
Dim neValues As Range, neFormulas As Range 

On Error Resume Next 
Set neValues = ActiveCell.EntireRow.SpecialCells(xlConstants) 
Set neFormulas = ActiveCell.EntireRow.SpecialCells(xlFormulas) 
On Error Goto 0 

If neValues Is Nothing And neFormulas Is NothingApplication.CountA(ActiveCell.EntireRow)=0 Then 
    MsgBox "Nothing There" 
Else 
    MsgBox "Something's There" 
End If 

检查http://www.ozgrid.com/forum/showthread.php?t=26509了解更多详情。

0

你没有给我们很多细节,但我认为COUNTBLANKS(范围)公式应该是你所需要的。

EDIT 在乌尔特定杜松我想尝试: = IF(CountBlanks(范围)=列(范围),0,1)

相关问题