CountIf Question

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
 
I

igor

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top