General information
Category:
Coding, syntax & commands
I don't think your problem has anything to do with FoxPro or how you are using the SUBTOTAL() function in Excel. I am no Excel guru and you should probably take this to a forum that deals in Excel (let me know if you find a good one).
The way I read the syntax for the SUBTOTAL, the first parameter designates the arithmetic function that you want to perform and the rest of the parameters must resolve to a reference to a cell or range of cells. I am not sure what your .T. and .F. parameters are doing, but if Excel's array handling is anything like FoxPro's, then passing "Array(4,6)" to Excel is the same as only passing the first element of the array. In other words, you are only passing the 4. So even if Excel were able to understand "Array(4,6)" in this context, it might not give you any different results.
I am not sure what the solution to your problem is, because, as I say, I am fairly sure it is an Excel problem. I believe that your parameters are being passed correctly from FoxPro. I just don't think they are the parameters that Excel needs to achieve the results that you desire. My first instinct is to pass a line that reads more like:
RANGE("A1").CURRENTREGION.SUBTOTAL(1,D2:D6,F2:F6)
but that is just a shot in the dark.
Good Luck. I know you'll figure it out.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only