Forum Discussion
Cas Ros
Feb 28, 2018Copper Contributor
Need help writing an excel formula
I'm trying to make a formula that sums the data below onto a single field.
if the value in column A is bigger than the value in Column B of the same row i want the value of column A - the value of ...
- Feb 28, 2018
Select a cell of your table(I guess table6)Table Tools in Ribbon > Design tab > Table Style Options > check Total RowGo to the total row of the table, replace the subtotal formula with=SUMPRODUCT(N([total needed] > [parents got]) * ([total needed] - [parents got]) + N(NOT([total needed] > [parents got])) * ([total needed] - 1))
Edition: Using the formula in total row of the table will make confusion. You may use the above formula in any other cells.
Also, use SUM function to wrap the formula in your post with Ctrl + Shift + Enter
{=SUM(IF(Tabel6[total needed] > Tabel6[parents got],Tabel6[total needed] - Tabel6[parents got],Tabel6[total needed] - 1))}note: I use comma (,) to seperate parameters; you may need to change it back to semi-colon(;) if that works on your side.
Willy Lau
Feb 28, 2018Iron Contributor
Select a cell of your table(I guess table6)Table Tools in Ribbon > Design tab > Table Style Options > check Total RowGo to the total row of the table, replace the subtotal formula with=SUMPRODUCT(N([total needed] > [parents got]) * ([total needed] - [parents got]) + N(NOT([total needed] > [parents got])) * ([total needed] - 1))
Edition: Using the formula in total row of the table will make confusion. You may use the above formula in any other cells.
Also, use SUM function to wrap the formula in your post with Ctrl + Shift + Enter
{=SUM(IF(Tabel6[total needed] > Tabel6[parents got],Tabel6[total needed] - Tabel6[parents got],Tabel6[total needed] - 1))}
note: I use comma (,) to seperate parameters; you may need to change it back to semi-colon(;) if that works on your side.
- Cas RosFeb 28, 2018Copper ContributorThank you! this works perfectly