Ok, a bit hard to explain this, hope someone understand...
I'm already using a macro to merge data from different Workbooks in a specific folder (same folder as the excel file using the macro is saved). Look further down for the macro I'm currently using.
The data that is imported to the excel file "holding" the macro is gonna be used as a database. I've tried using different general excel formulas (e.g. Vlookup, SUMIF, SUMIFS), which searching the database built up by using the macro. So far, so good..
The problem occure when I run the macro again, with a new set of data. The formulas result doesn't change. I guess they don't act dynamically.
To be a little more specific about what I'm trying to aim (please look at the attachment file):
In Sheet 2 column 'A' there are different project numbers (e.g. 101323). In Column 'C' (Sheet 2) I would get the total sum from Column 'L' in Sheet 1, based on the following criterium: project number, value in column 'A' in Sheet 2 are > 3000 and < 4000. In the attched example the result would have been 533653.
I know that I can use the SUMIFS function to solv this, but it doesn't seem to work when the data is generated by a macro. And as metioned already - a new set of data imported doesn't effect the formulas outcome. E.g. say the new set of data doesn't contain the project number "101323", the SUMIFS formlua won't return 0, but still 533653.
I should also mentioned that the project numers are dynamic, since they are linked to numbers in Sheet 3, column B (but I guess this would not be a problem).
Do I need a macro to solv this or do I just have to modify the macro I'm already using? Or something else... please help!
Here's the macro I'm using:
Bookmarks