Hi again,
looking for some pointers on something,
i have a user form with 2 text boxe and a combo box.
when the user picks an option in the combox, i can locate the item on the first sheet by "cheating", where as on the second sheet there is one less piece of data so i cant seem to pull off the same trick.
here is what i have
Private Sub CommandButton1_Click()
MsgBox "you have selected " & ComboBox1.Text & " which has an index of " & ComboBox1.ListIndex 'shows numeric value of selected specialty
Dim Spclty As Integer
intMonthNumberB = Month(CDate("01/" & ComboBox3.Text & "/2014"))
Spclty = ComboBox1.ListIndex + 6
Speclty = ComboBox1.Text
TextBox1.Text = Worksheets("DATA SHEET").Range("B" & Spclty).Offset(0, ((3 * intMonthNumberB) - 1)).Value
'textbox is equal to the value of Column B row specialty index +6rows, moving across right by the month value index multiplied by 3, minus 1 to bring it back to the correct value
TextBox2.Text = Speclty 'by asigning this i was going to try a vlookup here but there must be a tidier way
again any advice appreciated
Bookmarks