Dear all,
As a beginner in VBA, I'm pleased to write my first post.
Here is my problem:
I want to use excell functions in VBA to retrieve data from a closed workbook.
My formula uses SumProduct function (because I understood that SumIf works only with an open workbook) and I want to create a loop to fulfill directly all the cells (from 0 to 16 of the column A) with the result of this same formula.
But when I use the variable "i" (indicating the row) into the SumProduct function using the quote (A"&i&"), I have a compile error "Syntax error".
Sorry it's probably basic, but as a beginner, I already spent hours on it without finding any solution...
This formula works without any problem when used in a cell of Excell, so I used perhaps the formula in the wrong way.
Please find my code below:
I hope I am clear enough for your understanding.![]()
Please Login or Register to view this content.
Thanks a lot in advance for your support.
Regards,
Eric
Bookmarks