How would I write this equation into Excel (-((N)/2)), -((N-1)/2)), - ((N-2)/2)),…,0,…,((N-2)/2), ((N-1)/2), ((N)/2)) [closed]

戏子无情 提交于 2019-12-13 08:02:19

问题


I need to input an equation into excel, I have set a cell to equal N and then I need another cell to hold the information (-((N)/2)), -((N-1)/2)), - ((N-2)/2)),...,0,...,((N-2)/2), ((N-1)/2), ((N)/2))


回答1:


You can use array formula. Suppose, your value N is in C4 cell.

Select range in one column (for example B1:B20), then paste following formula:

=($C$4-(ROW(INDIRECT($C$4 & ":" & 3* $C$4))-$C$4))/2

and press CTRL+SHIFT+ENTER to evaluate it.


If you'd like to store data in row, then select range in one row (for example B1:S1), and paste following formula:

=TRANSPOSE(($C$4-(ROW(INDIRECT($C$4 & ":" & 3* $C$4))-$C$4))/2)

and press CTRL+SHIFT+ENTER to evaluate it.



来源:https://stackoverflow.com/questions/21093364/how-would-i-write-this-equation-into-excel-n-2-n-1-2-n-2-2

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