I'm putting together a spreadsheet to compare trades from an external clearer to my company's internal processes.
For this there is a requirement to keep a mapping table updated so if we trade something new we can update our data and ensure everything matches.
Now, here's my code for the userform for the mapping table that puts the information into the table
This works perfectly. With a problem
Due to the nature of the data from both sides I need to make certain allowances, as such where the data is inputting with this line
I need it to actually include the data from ".Cells(lRow, 1).Value = Me.txtMACCode.Value" and ".Cells(lRow, 3).Value = Me.CallPutFuture.Value"
But ONLY if the returned entry in the box is 'C' or 'P' so, for instance if the first item is POC and the second item is P I want the cell to receive POCP.
Is this possible?
For this there is a requirement to keep a mapping table updated so if we trade something new we can update our data and ensure everything matches.
Now, here's my code for the userform for the mapping table that puts the information into the table
Code:
Private Sub ToggleButton1_Click() 'Copy input values to sheet.
Dim lRow As Long
Dim ws As Worksheet
Set ws = Worksheets("Contract mapping")
lRow = ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
With ws
.Cells(lRow, 1).Value = Me.txtMACCode.Value
.Cells(lRow, 2).Value = Me.OurCode.Value
.Cells(lRow, 3).Value = Me.CallPutFuture.Value
.Cells(lRow, 4).Value = Me.Multiplier.Value
End With
'Clear input controls.
Me.txtMACCode.Value = ""
Me.OurCode.Value = ""
Me.CallPutFuture.Value = ""
Me.Multiplier.Value = ""
End Sub
This works perfectly. With a problem
Due to the nature of the data from both sides I need to make certain allowances, as such where the data is inputting with this line
I need it to actually include the data from ".Cells(lRow, 1).Value = Me.txtMACCode.Value" and ".Cells(lRow, 3).Value = Me.CallPutFuture.Value"
But ONLY if the returned entry in the box is 'C' or 'P' so, for instance if the first item is POC and the second item is P I want the cell to receive POCP.
Is this possible?