Hi to all, and thank you for all the great solutions that you provide in this forum.
I need to calculate the following in excel 2013 win7:
Data of the 1st sheet will be pasted from another software. In it there will be data of different customers. In B column there will be CODE of the expenses and in F column the SUM. CODE of expenses will be grouped into CODE CATEGORIES in sheet2. I need to calculate for every single customer by each code category the sum .
1-So i must generate a customers list (by its vat number) from sheet 1. (i can do it manually if it cant be done automatically)
2.-I must specify the range of cells that belong to each customer and contain their data. I have come up with this formula with which i can play : =SUM(OFFSET(INDIRECT(ADDRESS(MATCH(CONCATENATE("FM: ";M1);E:E;0);5));0;0;ABS(MATCH(CONCATENATE("FM: ";M2);E:E;0)-MATCH(CONCATENATE("FM: ";M1);E:E;0));2))
the vat is given by the software in "FM: 1015151515" format.
3. In sheet 2 i have grouped each expense code by category and each category has been marked by a number (i have done this by color and a macro command but since different excel versions show colors differently, in the example the categories are numbers).
4. I have tried with sumproduct and sumif as i show you in the table below but without success. I need to calculate somehow for each client (shorted by vat numbers), the sum of expenses in sheet1 column F, (with the following conditions) by each category at sheet 2 (H1 to M1) from the expense codes in the sheet1 that belong to this category (column B in sheet1 that matches the column A in sheet2. All this must include the offset function probably so as to understand the excel how many rows belong to each client.
These are the sheets -> with the formulas:
sheet 1 starting from A1:
----------------------------------------------------------------
[TABLE="width: 606"]
<colgroup><col span="7"><col></colgroup><tbody>[TR]
[TD="colspan: 2"]COMPANY[/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 2"]FM: 149186824[/TD]
[TD][/TD]
[TD]VAT NUMBERS FOR TEST
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]CREDIT[/TD]
[TD]DEBIT[/TD]
[TD]SUM[/TD]
[TD][/TD]
[TD="align: right"]149186824
[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]14.00.0000[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]338,05[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]338,05[/TD]
[TD][/TD]
[TD="align: right"]102958444
[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]20.00.0000[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]93,71[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]93,71[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]20.00.0013[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]112,09[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]112,09[/TD]
[TD][/TD]
[TD]SUM BY OFFSET TEST
[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD]62.03.0123[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]47,02[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]47,02[/TD]
[TD][/TD]
[TD="align: right"]=SUM(OFFSET(INDIRECT(ADDRESS(MATCH(CONCATENATE("FM: ";H2);E:E;0);5));0;0;ABS(MATCH(CONCATENATE("FM: ";H3);E:E;0)-MATCH(CONCATENATE("FM: ";H2);E:E;0));2))
[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD]62.04.0000[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]1.008,80[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1.008,80[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD]63.04.0000[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]290,22[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]290,22[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[TD]63.98.0000[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]33,72[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]33,72[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]8[/TD]
[TD]64.00.1023[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]285[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]285[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]9[/TD]
[TD]64.08.0023[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]55,29[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]55,29[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]10[/TD]
[TD]64.98.0000[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]74,95[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]74,95[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]11[/TD]
[TD]64.98.0023[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]1.460,04[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1.460,04[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]12[/TD]
[TD]73.10.0013[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]160,04[/TD]
[TD="align: right"]-160,04[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]13[/TD]
[TD]73.10.0023[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1.217,15[/TD]
[TD="align: right"]-1.217,15[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]14[/TD]
[TD]75.00.0000[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1.020,00[/TD]
[TD="align: right"]-1.020,00[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]15[/TD]
[TD]75.00.0023[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1.094,00[/TD]
[TD="align: right"]-1.094,00[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]----[/TD]
[TD]-----------[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]DATA[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 2"]COMPANY[/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 2"]FM: 102958444[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]CREDIT [/TD]
[TD]DEBIT[/TD]
[TD]SUM[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]61.92.0000[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]451,42[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]451,42[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]64.98.0000[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]0,3[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0,3[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
--------------------------------------------------------------------------------
sheet2 starting from A1
---------------------------------------------------------------------------------
[TABLE="width: 942"]
<colgroup><col><col><col span="2"><col><col><col span="6"></colgroup><tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]CATEGORY DESCRIPTIONS[/TD]
[TD]DESCRIPTION[/TD]
[TD]DESCRIPTION[/TD]
[TD]DESCRIPTION[/TD]
[TD]DESCRIPTION[/TD]
[TD]DESCRIPTION[/TD]
[TD]DESCRIPTION[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]CATEGORY CODES[/TD]
[TD="align: right"]65535
[/TD]
[TD="align: right"]10213316[/TD]
[TD="align: right"]9944516[/TD]
[TD="align: right"]9592886[/TD]
[TD="align: right"]3342489[/TD]
[TD="align: right"]3969910[/TD]
[/TR]
[TR]
[TD]CATEGORIZATION OF EXPENSE CODES[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]sumif test for all[/TD]
[TD]=SUMIF($C:$C;H2;$D:$D)
[/TD]
[TD="align: right"]205,8
[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD]CATEGORY CODE[/TD]
[TD]SUM BY CATEGORY ON ALL CLIENTS[/TD]
[TD]test sumproduct for all[/TD]
[TD][/TD]
[TD]VAT NUMBERS PER CLIENT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]65535[/TD]
[TD="align: right"]=SUMIFS(Sheet1!F:F;Sheet1!B:B;A5)
[/TD]
[TD="align: right"]=SUMPRODUCT((Sheet1!$F:$F);--(A5=Sheet1!$B:$B))
[/TD]
[TD][/TD]
[TD]FM: 149186824[/TD]
[TD="align: right"]=SUMPRODUCT(--($C$1:$C$10000=H$2);(Sheet1!$F$1:$F$10000);-($A$1:$A$10000=Sheet1!$B$1:$B$10000))
[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]65535[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD]FM: 102958444[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]65535[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD]more vat…[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]65535[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD]more vat…[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]65535[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD]more vat…[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]65535[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD]more vat…[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]10213316[/TD]
[TD="align: right"]93,71[/TD]
[TD][/TD]
[TD][/TD]
[TD]more vat…[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]10213316[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]10213316[/TD]
[TD="align: right"]112,09[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]10213316[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]10213316[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]10213316[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]9944516[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]9944516[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]9944516[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]9944516[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]9944516[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]255
[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]3342489[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]3342489[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]3342489[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]3342489[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
------------------------------------------------------------------------------------------------------------------------------------------------
I have put the formulas in sheet1 in cell H6 and in sheet2 in cells D5, E5, H5 and H3 please copy paste the above to see it in an excel.
I need to calculate the following in excel 2013 win7:
Data of the 1st sheet will be pasted from another software. In it there will be data of different customers. In B column there will be CODE of the expenses and in F column the SUM. CODE of expenses will be grouped into CODE CATEGORIES in sheet2. I need to calculate for every single customer by each code category the sum .
1-So i must generate a customers list (by its vat number) from sheet 1. (i can do it manually if it cant be done automatically)
2.-I must specify the range of cells that belong to each customer and contain their data. I have come up with this formula with which i can play : =SUM(OFFSET(INDIRECT(ADDRESS(MATCH(CONCATENATE("FM: ";M1);E:E;0);5));0;0;ABS(MATCH(CONCATENATE("FM: ";M2);E:E;0)-MATCH(CONCATENATE("FM: ";M1);E:E;0));2))
the vat is given by the software in "FM: 1015151515" format.
3. In sheet 2 i have grouped each expense code by category and each category has been marked by a number (i have done this by color and a macro command but since different excel versions show colors differently, in the example the categories are numbers).
4. I have tried with sumproduct and sumif as i show you in the table below but without success. I need to calculate somehow for each client (shorted by vat numbers), the sum of expenses in sheet1 column F, (with the following conditions) by each category at sheet 2 (H1 to M1) from the expense codes in the sheet1 that belong to this category (column B in sheet1 that matches the column A in sheet2. All this must include the offset function probably so as to understand the excel how many rows belong to each client.
These are the sheets -> with the formulas:
sheet 1 starting from A1:
----------------------------------------------------------------
[TABLE="width: 606"]
<colgroup><col span="7"><col></colgroup><tbody>[TR]
[TD="colspan: 2"]COMPANY[/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 2"]FM: 149186824[/TD]
[TD][/TD]
[TD]VAT NUMBERS FOR TEST
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]CREDIT[/TD]
[TD]DEBIT[/TD]
[TD]SUM[/TD]
[TD][/TD]
[TD="align: right"]149186824
[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]14.00.0000[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]338,05[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]338,05[/TD]
[TD][/TD]
[TD="align: right"]102958444
[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]20.00.0000[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]93,71[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]93,71[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]20.00.0013[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]112,09[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]112,09[/TD]
[TD][/TD]
[TD]SUM BY OFFSET TEST
[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD]62.03.0123[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]47,02[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]47,02[/TD]
[TD][/TD]
[TD="align: right"]=SUM(OFFSET(INDIRECT(ADDRESS(MATCH(CONCATENATE("FM: ";H2);E:E;0);5));0;0;ABS(MATCH(CONCATENATE("FM: ";H3);E:E;0)-MATCH(CONCATENATE("FM: ";H2);E:E;0));2))
[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD]62.04.0000[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]1.008,80[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1.008,80[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD]63.04.0000[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]290,22[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]290,22[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[TD]63.98.0000[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]33,72[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]33,72[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]8[/TD]
[TD]64.00.1023[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]285[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]285[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]9[/TD]
[TD]64.08.0023[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]55,29[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]55,29[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]10[/TD]
[TD]64.98.0000[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]74,95[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]74,95[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]11[/TD]
[TD]64.98.0023[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]1.460,04[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1.460,04[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]12[/TD]
[TD]73.10.0013[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]160,04[/TD]
[TD="align: right"]-160,04[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]13[/TD]
[TD]73.10.0023[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1.217,15[/TD]
[TD="align: right"]-1.217,15[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]14[/TD]
[TD]75.00.0000[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1.020,00[/TD]
[TD="align: right"]-1.020,00[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]15[/TD]
[TD]75.00.0023[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1.094,00[/TD]
[TD="align: right"]-1.094,00[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]----[/TD]
[TD]-----------[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]DATA[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 2"]COMPANY[/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 2"]FM: 102958444[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]CREDIT [/TD]
[TD]DEBIT[/TD]
[TD]SUM[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]61.92.0000[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]451,42[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]451,42[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]64.98.0000[/TD]
[TD]DESCRIPTION[/TD]
[TD="align: right"]0,3[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0,3[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
--------------------------------------------------------------------------------
sheet2 starting from A1
---------------------------------------------------------------------------------
[TABLE="width: 942"]
<colgroup><col><col><col span="2"><col><col><col span="6"></colgroup><tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]CATEGORY DESCRIPTIONS[/TD]
[TD]DESCRIPTION[/TD]
[TD]DESCRIPTION[/TD]
[TD]DESCRIPTION[/TD]
[TD]DESCRIPTION[/TD]
[TD]DESCRIPTION[/TD]
[TD]DESCRIPTION[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]CATEGORY CODES[/TD]
[TD="align: right"]65535
[/TD]
[TD="align: right"]10213316[/TD]
[TD="align: right"]9944516[/TD]
[TD="align: right"]9592886[/TD]
[TD="align: right"]3342489[/TD]
[TD="align: right"]3969910[/TD]
[/TR]
[TR]
[TD]CATEGORIZATION OF EXPENSE CODES[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]sumif test for all[/TD]
[TD]=SUMIF($C:$C;H2;$D:$D)
[/TD]
[TD="align: right"]205,8
[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD]CATEGORY CODE[/TD]
[TD]SUM BY CATEGORY ON ALL CLIENTS[/TD]
[TD]test sumproduct for all[/TD]
[TD][/TD]
[TD]VAT NUMBERS PER CLIENT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]65535[/TD]
[TD="align: right"]=SUMIFS(Sheet1!F:F;Sheet1!B:B;A5)
[/TD]
[TD="align: right"]=SUMPRODUCT((Sheet1!$F:$F);--(A5=Sheet1!$B:$B))
[/TD]
[TD][/TD]
[TD]FM: 149186824[/TD]
[TD="align: right"]=SUMPRODUCT(--($C$1:$C$10000=H$2);(Sheet1!$F$1:$F$10000);-($A$1:$A$10000=Sheet1!$B$1:$B$10000))
[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]65535[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD]FM: 102958444[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]65535[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD]more vat…[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]65535[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD]more vat…[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]65535[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD]more vat…[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]65535[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD]more vat…[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]10213316[/TD]
[TD="align: right"]93,71[/TD]
[TD][/TD]
[TD][/TD]
[TD]more vat…[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]10213316[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]10213316[/TD]
[TD="align: right"]112,09[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]10213316[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]10213316[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]10213316[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]9944516[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]9944516[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]9944516[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]9944516[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]9944516[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]255
[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]3342489[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]3342489[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]3342489[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DESCRIPTION[/TD]
[TD="align: right"]3342489[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
------------------------------------------------------------------------------------------------------------------------------------------------
I have put the formulas in sheet1 in cell H6 and in sheet2 in cells D5, E5, H5 and H3 please copy paste the above to see it in an excel.