You are more likely to get assistance if you attach a spreadsheet demonstrating the situation (remove confidential information then use Post Reply, not Quick Reply, and don't attach a picture instead of the spreadsheet itself). Explain which cells on which sheets will be involved in this calculation. In terms of those cells, explain in English how you want the calculation to be done. What cell on what sheet will hold the result? I will not help further unless you attach a spreadsheet document.
=IF(A2>20;B2-5;B2-1)
Or the IF function can be an operand for the subtraction operator (evaluate IF and pass the result to the subtraction operator).
=B2-IF(A2>20;C2;D2)
Functions can be nested (evaluate AND and pass the result to IF).
=IF(AND(A2>=10;A2<20);0;B2)
Operators can be combined (add the squares of two cells)
=A2^2+B2^2
The formula will begin with an equal sign before the first term. The last example shows that it is not necessary to use a function in a formula.
[Tutorial] Calc formula terms
[Tutorial] Order of Operations in Calc
[Tutorial] Ten concepts that every Calc user should know
SUMPPRODUCT and IF are Calc functions. Subtraction is a Calc operator, written with a minus sign. You can use a combination of functions and operators in a Calc formula. For example, the IF function can use the subtraction operator (subtract two numbers and pass the result to IF).I need to know if I can use =sumproduct() and =subtractif(), if that's a actual thing, in the same line of code.
=IF(A2>20;B2-5;B2-1)
Or the IF function can be an operand for the subtraction operator (evaluate IF and pass the result to the subtraction operator).
=B2-IF(A2>20;C2;D2)
Functions can be nested (evaluate AND and pass the result to IF).
=IF(AND(A2>=10;A2<20);0;B2)
Operators can be combined (add the squares of two cells)
=A2^2+B2^2
The formula will begin with an equal sign before the first term. The last example shows that it is not necessary to use a function in a formula.
[Tutorial] Calc formula terms
[Tutorial] Order of Operations in Calc
Calc does not have variables. Perhaps you mean that you have a cell, or a column of cells, or a row of cells, which contain transfer amounts. Your attachment should help make it clear what you mean. Explain what is your transfer data in your attachment.I barely begun to add the new variable TRANSFER.
[Tutorial] Ten concepts that every Calc user should know
Statistics: Posted by MrProgrammer — Sat Sep 21, 2024 4:47 am