CountIf Question

  • Thread starter Thread starter Jackson
  • Start date Start date
J

Jackson

I am new to this group, thanks in advance for any help given.

I have a columns such as:

1 4 5 7 9
5 6 7 5 3
4 5 9 0 3
6 4 5 6 2
7 8 9 0 2

I am trying to countif only if the entries in row 2 equals 5 and the
entries in row 4 equals 6.

Thanks for the help.

Jack
 
Here is what you may want to try:

Sub rename()
For col = 1 To 5
If Sheets("sheet1").Cells(2, col) = 5 And Sheets
("sheet1").Cells(4, col) = 6 Then
x = 1
Sheets("sheet1").Cells(8, 3) = x + 1
End If
Next col


End Sub

and adjust however you want

Igor
 
Back
Top