Hi @Burke, Brendan J ,
Please learn about Array Class and Standard numeric format strings
Private Sub btnCalculate_Click(sender As Object, e As EventArgs) Handles btnCalculate.Click
Dim bills(12) As String
bills = Split("12.50,22.00,16.46,34.55,121.11,19.00,43.25,66.70,98.44,80.00,56.67,5.57", ",")
Dim sum As Decimal
For Each bill As String In bills
sum += bill
Next
Dim monthlybill = sum / 12
lblBill.Text = monthlybill.ToString("C", CultureInfo.CurrentCulture)
End Sub
Best Regards.
Jiachen Li
----------
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.