I would like to write a macro that will count for me how many IRS items are in the INSTRUMENTS column, and then give this number in the indicated Range. However, I got a little lost. Someone could show me the way and help me
VBA Code:
With wbMe.Sheets("pochodne")
.AutoFilterMode = False
With .Range("A1:I11")
cIndex = Application.Match("INSTRUMENT", .Rows(1), 0)
If IsNumeric(cIndex) Then
.AutoFilter Field:=1, Criteria1:="IRS"
wbMe.Sheets("pochodne").Range("Q36").Value = wbMe.Sheets("pochodne").Range("A:A").Cells.SpecialCells(xlCellTypeConstants).Count
End With
End If
End With