Count cells with specific value in even rows
Macro Title:
|
Worksheet Variable:
|
Worksheet Name:
|
Range Reference:
|
Specific Value:
enter the cell reference where the value is captured |
Output Cell:
|
First Comment:
' |
Second Comment:
' |
Sub Count_cells_with_specific_value_in_even_rows()
'declare a variable
Dim ws As Worksheet
Set ws = Worksheets("Analysis")
'count cells with specific value in even rows
ws.Range("E8").Formula = "=SUMPRODUCT(--(MOD(ROW(B8:B14),2)=0),--(B8:B14=C5))"
End Sub
Sub Count_cells_with_specific_value_in_even_rows()
'declare a variable
Dim ws As Worksheet
Dim ws As Worksheet
Set ws = Worksheets("Analysis")
'count cells with specific value in even rows
ws.Range("E8").Formula = "=SUMPRODUCT(--(MOD(ROW(B8:B14),2)=0),--(B8:B14=C5))"
ws.Range("E8").Formula = "=SUMPRODUCT(--(MOD(ROW(B8:B14),2)=0),--(B8:B14=C5))"
End Sub