Not sure what you mean by PT.
But the programming is really easy; it's just a matter of knowing the right commands. Really all you need to know is ".AddItem" to control the ListBox/ComboBox and the basic array commands. (In this case ReDim and Ubound.) Here is some example code:
To use this you will need to first build a form following the general layout I put forth above. To save you work I made the code use default names. You will want 3 TextBoxes (TextBox1 will be customer, Textbox2 = Date, & TextBox3 = Amount); 1 ComboBox for "Category" (Please Type the values you want to be displayed in the category dropdown box in Sheet2); 1 ListBox to Keep track of multiple amounts, and lastly 2 command buttons (CommandButton1 will be the "Add Amount", CommandButton2 will be Add Record).
Right-click on the UserForm, select "View Code" and paste in the code below:
<hr>
<font face=Courier New><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> UserForm_Initialize()
<SPAN style="color:#007F00">'If you would like to put your categories in a spreadsheet for easy editing you can do via</SPAN>
<SPAN style="color:#007F00">'the following example.</SPAN>
<SPAN style="color:#00007F">Dim</SPAN> AI() <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">String</SPAN>
<SPAN style="color:#00007F">Dim</SPAN> X <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Byte</SPAN>
<SPAN style="color:#00007F">ReDim</SPAN> AI(ThisWorkbook.Sheets("Sheet2").Range("A65536").End(xlUp).Row)
<SPAN style="color:#00007F">For</SPAN> X = 1 <SPAN style="color:#00007F">To</SPAN> ThisWorkbook.Sheets("Sheet2").Range("A65536").End(xlUp).Row
AI(X) = ThisWorkbook.Sheets("Sheet2").Range("A" & X).Value
<SPAN style="color:#00007F">Next</SPAN> X
<SPAN style="color:#00007F">For</SPAN> X = 1 <SPAN style="color:#00007F">To</SPAN> <SPAN style="color:#00007F">UBound</SPAN>(AI)
Me.ComboBox1.AddItem AI(X)
<SPAN style="color:#00007F">Next</SPAN> X
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN>
<SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> CommandButton2_Click()
<SPAN style="color:#00007F">Dim</SPAN> LoopCounter <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Byte</SPAN>
<SPAN style="color:#00007F">Dim</SPAN> RecordArray() <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">String</SPAN>
<SPAN style="color:#00007F">Dim</SPAN> MultipleRecords <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Boolean</SPAN>
<SPAN style="color:#007F00">'Make this variable true if you want to add an individual record for each category</SPAN>
<SPAN style="color:#007F00">'and amount entry. Make it False if you want multiple amounts to be added out to the</SPAN>
<SPAN style="color:#007F00">'right in extra columns</SPAN>
MultipleRecords = <SPAN style="color:#00007F">False</SPAN>
<SPAN style="color:#007F00">'Clears Previous Records and prepares array for first two values.</SPAN>
<SPAN style="color:#00007F">ReDim</SPAN> RecordArray(1)
<SPAN style="color:#007F00">'Adds Values to Array.</SPAN>
RecordArray(0) = Me.TextBox1
RecordArray(1) = Me.TextBox2
<SPAN style="color:#007F00">'Loads ListBox values into array so they can be easily looped out into multiple columns</SPAN>
<SPAN style="color:#007F00">'across one row.</SPAN>
<SPAN style="color:#00007F">For</SPAN> LoopCounter = 0 <SPAN style="color:#00007F">To</SPAN> Me.ListBox1.ListCount - 1
<SPAN style="color:#00007F">ReDim</SPAN> <SPAN style="color:#00007F">Preserve</SPAN> RecordArray(UBound(RecordArray) + 1)
RecordArray(UBound(RecordArray)) = Mid(Me.ListBox1.List(LoopCounter), 1, InStr(Me.ListBox1.List(LoopCounter), ",") - 1)
<SPAN style="color:#00007F">ReDim</SPAN> <SPAN style="color:#00007F">Preserve</SPAN> RecordArray(UBound(RecordArray) + 1)
RecordArray(UBound(RecordArray)) = Mid(Me.ListBox1.List(LoopCounter), InStr(Me.ListBox1.List(LoopCounter), ",") + 1)
<SPAN style="color:#00007F">Next</SPAN> LoopCounter
<SPAN style="color:#00007F">If</SPAN> MultipleRecords = <SPAN style="color:#00007F">True</SPAN> <SPAN style="color:#00007F">Then</SPAN>
<SPAN style="color:#007F00">'Adds a record for each item in list box</SPAN>
<SPAN style="color:#00007F">For</SPAN> LoopCounter = 2 <SPAN style="color:#00007F">To</SPAN> <SPAN style="color:#00007F">UBound</SPAN>(RecordArray) <SPAN style="color:#00007F">Step</SPAN> 2
ThisWorkbook.Sheets("Sheet1").Range("A65536").End(xlUp).Offset(1, 0).Value = RecordArray(0)
ThisWorkbook.Sheets("Sheet1").Range("A65536").End(xlUp).Offset(0, 1).Value = RecordArray(1)
ThisWorkbook.Sheets("Sheet1").Range("A65536").End(xlUp).Offset(0, 2).Value = RecordArray(LoopCounter)
ThisWorkbook.Sheets("Sheet1").Range("A65536").End(xlUp).Offset(0, 3).Value = RecordArray(LoopCounter + 1)
<SPAN style="color:#00007F">Next</SPAN> LoopCounter
<SPAN style="color:#00007F">Else</SPAN>
<SPAN style="color:#007F00">'Adds Record to "Sheet1" if you used more than one amount and category it will be added to</SPAN>
<SPAN style="color:#007F00">'the columns to the right.</SPAN>
ThisWorkbook.Sheets("Sheet1").Range("A65536").End(xlUp).Offset(1, 0).Value = RecordArray(0)
<SPAN style="color:#00007F">For</SPAN> LoopCounter = 1 <SPAN style="color:#00007F">To</SPAN> <SPAN style="color:#00007F">UBound</SPAN>(RecordArray)
ThisWorkbook.Sheets("Sheet1").Range("A65536").End(xlUp).Offset(0, LoopCounter).Value = RecordArray(LoopCounter)
<SPAN style="color:#00007F">Next</SPAN> LoopCounter
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN>
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN>
<SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> CommandButton1_Click()
<SPAN style="color:#007F00">'This command button action will add the "Amount" and "Category" to your listbox.</SPAN>
Me.ListBox1.AddItem Me.TextBox3.Value & "," & Me.ComboBox1.Value
Me.TextBox3.Value = <SPAN style="color:#00007F">Empty</SPAN>
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN>
</FONT>
<hr>
What it does:
CommandButton 1 will add the multiple Amounts to ListBox1. When you have all the amounts in, press Command Button2 to add record. This places the record in Sheet1.