I have an Excel sheet . It consists of the projects expenditures of each project for different months. Some projects would have more than one entry. The expenditures are in billions of dollars.
Some projects would start in Jan and would end by Dec. So that Start quarter would be Q1 and end quarter would be Q4. Some projects would start in Apr and the end by Dec. So the start quarter for them is Q2 and End quarter is Q4.
If a project is started in a certain quarter, then atleast one cell value in that quarter would have an expenditure value. If all the project entry values for all the months are 0.00 then it means that the project had ended in that value.
For example if a project had 4 entries and all the values of that project from Oct to December are 0.00 it means the project ended by Sept. The project end quarter is Q3.
Similarily, if the project had 4 entries and all values of that project from Jan to March are 0.00 then the project had no entries in Q1 and the project start quarter is Q2.
I am attaching the input Excel sheet and the out put that I am expecting
Could some one please suggest a VBA code as to how to achieve it?