Count cells that are blank
Macro Title:
|
Worksheet Variable:
|
Worksheet Name:
|
Range Reference:
range from which you want to count the number of blank cells |
Output Cell:
|
First Comment:
' |
Second Comment:
' |
Sub Count_cells_that_are_blank()
'declare a variable
Dim ws As Worksheet
Set ws = Worksheets("Analysis")
'apply the formula to count cells that are blank
ws.Range("C13") = Application.WorksheetFunction.CountBlank(ws.Range("C5:C11"))
End Sub
Sub Count_cells_that_are_blank()
'declare a variable
Dim ws As Worksheet
Dim ws As Worksheet
Set ws = Worksheets("Analysis")
'apply the formula to count cells that are blank
ws.Range("C13") = Application.WorksheetFunction.CountBlank(ws.Range("C5:C11"))
ws.Range("C13") = Application.WorksheetFunction.CountBlank(ws.Range("C5:C11"))
End Sub