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