D
David C. Allen
I have a sheet with this formula in one cell: =COUNTIF('Weekly
Data'!N2:N95,"ABC")
In place of the 95 in the formula I want to call a macro that calculates it:
I have the macro coded as such:
Function CalcWeeklyRows() As Integer
CalcWeeklyRows = ActiveWorkbook.Worksheets("Weekly
Data").UsedRange.Rows.Count - 1
End Function
I can not seem to figure out the syntax for putting the call to the macro in
there; I have tried something like this:
=COUNTIF('Weekly Data'!N2:N" & CalcWeeklyRows() & ","ABC")
but Excel won't take it. I am using Excel 2000
Can someone help me with this?
Thanks!
Data'!N2:N95,"ABC")
In place of the 95 in the formula I want to call a macro that calculates it:
I have the macro coded as such:
Function CalcWeeklyRows() As Integer
CalcWeeklyRows = ActiveWorkbook.Worksheets("Weekly
Data").UsedRange.Rows.Count - 1
End Function
I can not seem to figure out the syntax for putting the call to the macro in
there; I have tried something like this:
=COUNTIF('Weekly Data'!N2:N" & CalcWeeklyRows() & ","ABC")
but Excel won't take it. I am using Excel 2000
Can someone help me with this?
Thanks!