PDA

View Full Version : Total data if salary each month is the same - VBA



wrightyrx7
03-05-2014, 07:33 AM
Hi All,


I have the attached data, and to submit it to the Third Party it needs to be compressed (please note the coloured cells are only there to show how the data looked before and after)


Trying to put how it works into words is proving difficult as this thread is also posted HERE (http://www.ozgrid.com/forum/showthread.php?t=186611&goto=newpost**)


The data is compressed down to how much is earned on each "Full time ANNUAL salary" but the total for each "Full time ANNUAL salary" must reset when the salary for the following month changes.


EXAMPLE
In the Workbook attached....


Lines 2,3,4 all have £10,000.00 but are not totalled together because:


April - Full time ANNUAL salary = £10,000.00
May - Full time ANNUAL salary = £10,000.00
June - Full time ANNUAL salaries = £10,000.00 and £15,000.00


Because there was a change in June in ONLY April and May can be summarized.


Lines 4 to 9 are totalled in 2 lines because:


June - Full time ANNUAL salaries = £10,000.00 and £15,000.00
July - Full time ANNUAL salaries = £10,000.00 and £15,000.00
August - Full time ANNUAL salaries = £10,000.00 and £15,000.00


Because there was no change in salary, these months can all be grouped.

11366


Also posted HERE (http://www.excelforum.com/excel-programming-vba-macros/994107-total-data-if-salary-each-month-is-the-same-vba.html)