I have a workbook/worksheet I wish to use to input Treasury futures prices in order to calculate a running P&L with. There is an Entry Price cell and an Exit Price cell which calculates and returns a money value into a P&L cell. I have all the math in place already. Treasury future quotes are as such: "121'050" with the next up tick being "120'055." These two quotes stand for 121 5/32 and 121 11/64. 121 is called the "handle" with 050 and 055 called the "tick".
I have a UserForm which opens when I click in any Entry Price or Exit Price cell on my spreadsheet. The UserForm has TextBox1 ("Handle") and TextBox2 ("Tick") and a CmdButton (OK). I have a table listing each "Tick" with the corresponding 32nd or 64th fractional value.
I need to run a VBA script so when I click the CmdButton (OK) the entered TextBox2 value (Tick) searches the table or range of cells for that Tick, then references the corresponding 32nd or 64th, then adds that fraction to the Handle value from TextBox1 and inserts the completed number (e.g. 121 5/32) into the Entry Price or Exit Price cell I originally clicked.
Thanks in advance for all help! (I am new to VBA and need a little help with this.)
Bookmarks