Dear Experts,
In my excel spreadsheet stocks in and out are entered as follows:
From Row 5
Col F Stock name
Col H Quantity
Col I Price
Col L Cumulative Qty
Col M Cumulative buy cost
Col K Cost(In this column is a formula to fill in cost of stock issued and brought in "=IF($H5>=0,H5*I5,-(MAX(IF($L5:$L5<-SUMIF($H5:$H5,"<0"),$M5:$M5))
-(SUMIF($H5:$H5,"<0")+MAX(IF($L5:$L5<-SUMIF($H5:$H5,"<0"),$L5:$L5)))
*INDEX($I5:$I5,MATCH(MIN(IF($L5:$L5>=-SUMIF($H5:$H5,"<0"),$L5:$L5)),$L5:$L5,0))
+SUMIF(OFFSET(K5,-1,0,-ROW(K5)+1,1),"<0")))",
it works perfectly but only for single stock variety, how do i modify it to work for different stocks?
At present i have to create many worksheets for each stock variety.
Thank you for your inputs.
Gauss