Glenn thank you very much for your interest, please any help is appreciated. I have spent over a week building this excel, and it is soooo slow..i am desperate for a solution.

Ok, to give you an idea (overview) of my excel, i have an online shop. In this excel, i directly copy the invoice i get from my supplier. The excel first breaks down the info into models, colours and prices, this is the first sheet. The second sheet, sorts alphabetically the unique products. Then there is a sheet that is retrieved from a joomla database with the sales, and another sheet that i mannually enter any sales not registered in the database. A third sheet adds the quantities of both the web sales and the manual sales. Hence the worksheet "analytics" has all the info in several columns. The average price bought, the current prices of items including VAT, prices excluding vat, stock (sales - buys), etc. The excel is not big as fasr as data it has less than 500 rows of items originating from invoices.

Now to your question.

This are the three commands that i use to seperate data from the "one line invoice"

1-line invoice example: <TABLE style="WIDTH: 463pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=617><COLGROUP><COL style="WIDTH: 463pt; mso-width-source: userset; mso-width-alt: 22564" width=617><TBODY><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; WIDTH: 463pt; HEIGHT: 15pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" class=xl63 height=20 width=617>2 TL140496 Caterina - Lady leather bag - Colour: Brown 0% 67,42 EUR 134,84 EUR</TD></TR></TBODY></TABLE>

The above line i split up with these commands

=IFERROR( (MID(C30;FIND(" ";C30;1)+1;(FIND(" ";C30;FIND(" ";C30;1)+1)-FIND(" ";C30;1))-1));"") - To get the code (TL140496)

also

=IFERROR(MID(C30;(FIND(" ";C30;(FIND(" ";C30;1)+1))+1);(FIND("-";C30;(FIND(" ";C30;(FIND(" ";C30;1))))+1)-FIND(" ";C30;(FIND(" ";C30;1)+1)))-2);"") - to get the name of the item, and so on.

Now regarding sumproduct take a few commands

=SUMPRODUCT(('TusOrders'!F:F=B8)*('TusOrders'!H:H=C8);'TusOrders'!G:G) - to some up the quantities

=SUMPRODUCT((('TusOrders'!E:E)=A2)*(('TusOrders'!H:H)=C2);'Tuscany Orders'!J:J)/SUMPRODUCT((('TusOrders'!E:E)=A2)*(('TusOrders'!H:H)=C2);'TusOrders'!G:G) - to find average price (this i did today, even without this command, excel does not improove speed)

calculating sales from websales worksheet is this: =SUMPRODUCT((DB_Sales!C:C=A2)*(DB_Sales!Q:Q=C2);DB_Sales!E:E)

calculating sales from manual import "sales" worksheet is this: =SUMPRODUCT((Sales!D:D=A2)*(Sales!F:F=C2);Sales!H:H)

Adding the 2 above gives me total sales.

Unique ITEMS:

In order to automatically find and sort all unique items (I do this from the invoice worksheet) i use these for formulas.

=IF('TusOrders'!D2="";"";IF(COUNTIF('TusOrders'!$D$2:D2;'TusOrders'!D2)>1;"";ROW()))

=COUNTIF($C$2:$C$350;"<="&C2)

=IF(ROW(A1)>COUNT(A:A);;INDEX('TusOrders'!D:D;SMALL(A:A;ROW(A1))))

=VLOOKUP(CELL("row";B2);$B$2:$C$350;2;FALSE)

any suggestions please?