hi there,
I'm testing out a VBA using application.worksheetfunction.countifs()
When i hit the button, i keep getting 0.![]()
Dim n As Integer Dim result As Double Dim lastr As Integer lastr = Worksheets("Sheet1").UsedRange.Rows.Count For n = 2 To lastr result = Application.WorksheetFunction.CountIfs(Cells(n, 1), "O", Cells(n, 2), "Yes") Next n Worksheets("Sheet1").Range("J1").Value = result
any ideas?
I'm using excel 2010
thank you
Bookmarks