Hi, I am still really new to this macro stuff and am trying to apply the subtotal function to give me a value in a cell. I have a filtered range in a different workbook, I need to count the number of cells visible that include data. It is my understanding that this is what the subtotal function is for. Unfortunately I can't figure out the syntax or the code. This is how it looks right now and I keep getting a "type mismatch" error. Please help, thanks so much!
ActiveCell.Value = Application.WorksheetFunction.Subtotal(xlCount, Workbooks("Workbook2.xls"), Worksheets("Sheet2").Range("A:A"))
Bookmarks