Posts by hungryheart08

    Re: SUMIF with the ranges from another sheet


    Thank you for the solution. I was thinking on how to automatically update the sumifs formula as well, the very reason why I am placing the last row number of data in the second sheet.


    I applied your solution Smallman, thank you very much for your time. :)

    Hello, I am a beginner in VB Excel and would like to know on how I can workaround with my problem.


    In my file, I have two sheets, the first sheet is where I can possibly update the file (invoices) while the other is where I need to get the sum of the values from the first sheet.


    What I need to do is to do a sumif in the second sheet. I can do this with an excel formula, however, I need to this for the next 3 years (36 months) and I cannot simply copy the sumif formula since there are columns in between the months.


    The code for my second sheet is as follows:



    The parts italicized and underlined is where I am getting an error.


    I am not really sure on how I can define the three ranges and on how I can possibly loop it for the next months.. :(


    Thank you very much in advance for your responses!


    Godspeed!