Hi,
I have dates in column A, drop-down list in column B, and values in column C. I want to display month name and values for each month If I select value from combobox.
Example - value "P" (Combobox "Petrol") entered in column B:
January : 233
February : 345
March : 444 etc...
This is my code:
Private Sub ComboBox1_Change()
If ComboBox1.ListIndex = 0 Then
For Each cell In Range("A1:A366")
Select Case cell.Offset(, 1).Value
Case "P"
TextBox1.Text = Format(cell.Value, "mmmm") & " : " & cell.Offset(, 2).Value
End Select
Next cell
End If
End Sub
Problem is that I get only one result displayed in textbox. How can I change this to all months ?
Sample is attached !
Thanks for help !
Bookmarks