I setup a table in Office 2016 that gets data from a pivot table to calculate sales by personnel, multiply with how much they're worth, calculate the total and rank them according to total points and some other data not included in the pivot. There are some sales made by A personnel with B's account so I setup three more of the same table in order to add or remove sales count from each personnel. So data flow goes like this:
-Pivot Table *The Original Table --->--- Main Add/remove Table ---<--- Add/remove Tables
The main add/remove table gets data from the original table and adds/removes numbers written in add/remove tables. A cell in the main add/remove table looks like this:
=OCAK25!E9+E33-P33
OCAK!25 sheet is the original table while E33 and P33 are add/remove tables. There are more columns for sales types but that's the general idea.
name | type1 sales | type2 sales | total |
---|---|---|---|
formulas | =OCAK25!E9+E33-P33 | =OCAK25!F9+F33-Q33 | =(E5*$U$5)+(F5*$U$6)+(G5*$U$7)+(H5*$U$8)+(I5*$U$9)+(J5*$U$10) |
john | 3 | 5 | 8 |
james | 2 | 7 | 9 |
jane | 1 | 2 | 3 |
=(E5*$U$5)+(F5*$U$6)+(G5*$U$7)+(H5*$U$8)+(I5*$U$9)+(J5*$U$10)
I get the total through this formula. Had to use $ because whenever I sorted, source range in U column went off the range.
The problem is when I sort according to total value the table sorts randomly. The table looks like the example table I set rather than james>john>jane. Personnel with zero sales are at the second or third place, while higher sale numbers are listed much below(No it isn't ascending, it's descending). I don't know what could have gone wrong, sorting worked fine before adding the add/remove tables.