Count cells from entire column that contain text
Macro Title:
|
Worksheet Variable:
|
Worksheet Name:
|
Column Reference:
enter the column reference from which you want to count the number of cells that contain text |
Output Cell:
|
First Comment:
' |
Second Comment:
' |
Sub Count_cells_from_entire_column_that_contain_text()
'declare a variable
Dim ws As Worksheet
Set ws = Worksheets("Analysis")
'count the number of cells in a single column that contain text
ws.Range("E5") = Application.WorksheetFunction.CountIf(ws.Range("C:C"), "*")
End Sub
Sub Count_cells_from_entire_column_that_contain_text()
'declare a variable
Dim ws As Worksheet
Dim ws As Worksheet
Set ws = Worksheets("Analysis")
'count the number of cells in a single column that contain text
ws.Range("E5") = Application.WorksheetFunction.CountIf(ws.Range("C:C"), "*")
ws.Range("E5") = Application.WorksheetFunction.CountIf(ws.Range("C:C"), "*")
End Sub