To calculate the total stock value for any part, we use the SUM function along with the IF function in Excel 2010.
SUM: - This function is used to add / sum all the numbers in a range of cells.
Syntax of SUM function: -=SUM(number1, number2,……)
For example:Cells A2:A5 contain numbers.We need to add all the numbers and show the result in cell B2.
Follow the below given steps:-
IF: - Checks whether a condition is met and returns one value if True and another value if False.
Syntax of “IF” function =IF(logical test,[value_if_true],[value_if_false])
First the formula will perform a logical test and return one value if the logical test is true and another value if the test is false.
For example:Cells A2 and A3 contain the numbers 3 and 5. If the number is 3, then the formula should display “Yes”, else “No”.
Let’s take an example to understand how we can calculate the total stock value for any part.
We have data showing the parts and their respective quantity sold with the amounts. We need to return the total sold amount for product A880Q.
To calculate the total stock value follow below given steps.
Note: This is an array function.After entering the formula in the cell press F2 and then press Ctrl+Shift+Enter on your keyboard.
This is the way we can calculate the total stock value by using the SUM function along with the IF function in Microsoft Excel.
The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.