HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
In this case we help the Poke Mart merchant to create a shop cart overview with prices, discount and total price. You will practice the skills that you have learned in the earlier chapters
In this case we help the Poke Mart merchant to create a shop cart overview with prices, discount and total price. You will practice the skills that you have learned in the earlier chapters.
Copy values or type the following data:
To solve the case we need to complete the following:
C2:C8
)B10
)B11
)B13
)Start by creating the first formula for Item price*Shop
cart. We want the price to change when we change items in the Shop cart. Use the fill function on the range D2:D8
afterwards to save time.
Step by step:
C2
, type (=
)B2
*
)D2
Test the formula by Typing D2(1)
:
Did you get C2(200)
? That matches the price for one Pokeball!
Good job!
We need the same formula for C2:C8
, let's fill it downwards!
Note: We need relative references as we want the fill function to continue the formula to the next rows.
Fill D2:D8
to double check the prices:
Let us find the subtotal by using the SUM
function on the C2:C8
range.
B10(=SUM)
SUM
functionC2:C8
SUM
function.
Next, let's add a 10%
discount. Type F11(10)
:
Apply the discount to the subtotal:
B11
, type (=
)(1/F11)*B10
Note: The (1/F11)
was used to change the value 10
to 0,1
, which is 10%
.
Subtract the discount B11
from the subtotal B10
to calculate the total.
=
)B10
-
)B11
You have completed all the tasks for the Poke Mart merchant.
C2:D8
calculates the prices by multiplying item price and shop cart
SUM
function adds the range C2:C8
F11(10)
into the formula in B11
Try changing the amounts in the shop cart and discount to see how the calculations adapt!
function copyFormulas(elementId){ /* Get the text field */ var copyText = document.getElementById(elementId); /* Select the text field */ copyText.select(); copyText.setSelectionRange(0, 99999); /* For mobile devices */ /* Copy the text inside the text field */ navigator.clipboard.writeText(copyText.value) .then(() => { alert('Range copied to clipboard.\nIt can now be pasted into the Excel spreadsheet.') }) .catch((error) => { alert(`Copy failed! ${error}`) }) }