• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Fill the right cell.

Belleke

Well-Known Member
I have a userform with 1 combobox and 2 textboxes.
In column A I have names from A3 down, in row 2 from B2 to the left I have dates.
I am trying to find a code that looks at the combobox value (name) and the textBox1 value (date) an than fills the correct cell with the value of textbox 2
for example The combobox.value (name) is in A4 and the textbox1 value (date) is in E2 then the textbox2 value has to go in cell E4
thanks in advance.
See example.
 

Attachments

  • Rooster 2018.xlsm
    20.4 KB · Views: 8
Something like below.
Code:
Private Sub Cmd_00_Click()
Dim c As Range

Set c = Range("2:2").Find(T_00.Value, Lookat:=xlWhole, LookIn:=xlValues)

If Not c Is Nothing Then
    Cells(C_00.ListIndex + 3, c.Column).Value = T_01.Value
Else
    MsgBox "Please enter valid date"
End If
End Sub
 
Back
Top