Hi guys ,
I have code to calculate stock across sheets on form.
now I add two TOTAL columns(I,J) in STA sheet and others sheets keep the same structure
, what I want sum and subtract TOTAL columns across sheets.
the sheets should be =STA+RPA-SS (COLUMNS =TOTAL(I+H-H)) and divide result on QTY for column (10) in listbox
and Sheets should be =STA+SR-RR(COLUMNS =TOTAL(J+H-H)) and divide result on QTY for column (10) in listbox
ex: FR-1 ID= (2000+1200+1300)-(60+220)=4260 / 379=11.24010554 as show in column 11 in listbox
FR-1 ID=(3000+75)-(30+30)=3015/379 as show in column 12 .
result as the picture in last sheet when there is no selected sheet from combobox1.
as to when select sheet name then just
to reminding what code really does it.
I have many sheets about five sheets contains data are almost 3000 rows for each sheet and it will increase continuously . so what I want when run the userform should merge the duplicate items based on COL B across the sheets each sheet repeat the items except the first sheet because this data collected from previous year. the others sheets are current year operations with considering the second sheet sometimes contains new item then should show in listbox . after merge duplicate items should show the QTY for each sheet . about COL 11 in list box and calculate like this as item (FR1)=200+200-5+4-20=379
as columns 11,12 in list box will calculate price average as I mentioned above
column 13 in list box =columns(12-11)* column(10).
as to selected sheet from combo box should follow the same way when calculation the price average when there is duplicates ID in each sheet alone without calculation across sheets.
the ID is not necessary to be existed in all sheets , sometimes there are new IDs in sheet and not existed in other sheets.
thanks
Bookmarks