Hi,
First time post here. 
I'm new to VBA and must be doing something simple wrong here.
I need to use a COUNTIF function in VBA across two workbooks (it needs to be a function in VBA- I can't just type the formula in Excel because I use variables within the filename from which I take the range).
So the range is within the workbook starting "MStoGTR", within Col C of sheet "SCB_ACKd".
The criteria is in the active sheet, one cell to the left (FYI: I plan to later drag the COUNTIF down in that column).
Thanks in advance!
Rich
worksheetfunction.CountIf( _
Workbook("MStoGTR_Rates" & RMdate & RMmonth & ".xlsx").Sheet(SCB_ACKd!).Range("C:C"), ActiveCell.Offset(0,-1))
Bookmarks