Sort without altering cell index

流过昼夜 提交于 2019-12-11 11:48:59

问题


I am looking for a solution to following issue :

I want to know the sum of A/Cs 3, 4 and 5 all the time in H7 (In Picture). But, I will also want to sort the date occasionally to verify the next due but without affecting H7

But, What actually happens when sorting in ascending order, the Cell index itself is getting changed and the value at H7 gives me the different value (which is not what I want).

Is it possible to freeze the Cell index during sort?


回答1:


Try a SUMIF function with OR criteria.

=SUM(SUMIF(A:A, {3,4,5}, B:B ))



回答2:


Use the formula to calculate total: =SUMIFS(B4:B8,A4:A8,">=3",A4:A8,"<=5")

What this does is it adds the values in the range B4:B8 only when values in range A4:A8 is greater than or equal to 3 and less than or equal to 5.



来源:https://stackoverflow.com/questions/32348432/sort-without-altering-cell-index

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!