Implementing Pricing Logic and Data Storage in Excel VBA
Classified in Mathematics
Written on in
English with a size of 4.42 KB
1. Product Pricing and Discount Calculation
Handling Quantity Change (c1_Change)
Private Sub c1_Change()
cantidad = c1
End Sub
Calculating Total Price and Discounts (calcular_Click)
This procedure calculates the total price based on the selected product and quantity, applies conditional discounts, and determines the final amount payable, including VAT (19%).
Private Sub calcular_Click()
Dim total As Double
Dim dcto As Double
' Calculate base total based on product price
If producto = "Arroz" Then
total = 890 * cantidad
End If
If producto = "Fideos" Then
total = 580 * cantidad
End If
If producto = "Torta Piña" Then
total = 2690 * cantidad
End If
' Apply conditional... Continue reading "Implementing Pricing Logic and Data Storage in Excel VBA" »