Create a userform that finds a cell address based on 2 input boxes

  • Hello,


    I am trying to create a Userform that would search a sheet based on the 2 inputboxes. I would like to search a specific column for one input box, then the column for the second inputbox. Where the 2 coordinates intersect, i would like to select that cell and input a value based on a 3rd selection. I am pretty new to VBA, but im sure this is a fairly simple task to complete.


    any help on this would be much appreciated!


    EX:
    [TABLE="width: 240"]

    [tr]


    [TD="width: 64, bgcolor: transparent"][/TD]
    [TD="width: 64, bgcolor: transparent"]A[/TD]
    [TD="width: 64, bgcolor: transparent"]B[/TD]
    [TD="width: 64, bgcolor: transparent"]C[/TD]
    [TD="width: 64, bgcolor: transparent"]D[/TD]

    [/tr]


    [tr]


    [TD="bgcolor: transparent, align: right"]1[/TD]
    [TD="class: xl63, bgcolor: transparent, align: right"]$1.00[/TD]
    [TD="class: xl63, bgcolor: transparent, align: right"]$4.00[/TD]
    [TD="class: xl63, bgcolor: transparent, align: right"]$7.00[/TD]
    [TD="class: xl63, bgcolor: transparent, align: right"]$10.00[/TD]

    [/tr]


    [tr]


    [TD="bgcolor: transparent, align: right"]2[/TD]
    [TD="class: xl63, bgcolor: transparent, align: right"]$2.00[/TD]
    [TD="class: xl63, bgcolor: transparent, align: right"]$5.00[/TD]
    [TD="class: xl63, bgcolor: transparent, align: right"]$8.00[/TD]
    [TD="class: xl63, bgcolor: transparent, align: right"]$11.00[/TD]

    [/tr]


    [tr]


    [TD="bgcolor: transparent, align: right"]3[/TD]
    [TD="class: xl63, bgcolor: transparent, align: right"]$3.00[/TD]
    [TD="class: xl63, bgcolor: transparent, align: right"]$6.00[/TD]
    [TD="class: xl63, bgcolor: transparent, align: right"]$9.00[/TD]
    [TD="class: xl63, bgcolor: transparent, align: right"]$12.00[/TD]

    [/tr]


    [tr]


    [TD="bgcolor: transparent, align: right"]4[/TD]
    [TD="class: xl63, bgcolor: transparent, align: right"]$4.00[/TD]
    [TD="class: xl63, bgcolor: transparent, align: right"]$7.00[/TD]
    [TD="class: xl63, bgcolor: transparent, align: right"]$10.00[/TD]
    [TD="class: xl63, bgcolor: transparent, align: right"]$13.00[/TD]

    [/tr]


    [/TABLE]



    I'd like to input "B" into 1 input box and "2" into the second input box and have the userform select the "$5.00"cell.

  • Re: Create a userform that finds a cell address based on 2 input boxes


    Hello,


    Maybe something like this will help



    Thanks

  • Re: Create a userform that finds a cell address based on 2 input boxes



    Thank you for the input fredl02010, i am getting an error saying:
    Compile error: Sub Or function not defined at line:
    Icol = textbox1


    Also, does this function search a specific column? I have a user ID in the column, and Dates in the row. So, textbox1 would have a user ID and textbox2 would have a date.

  • Re: Create a userform that finds a cell address based on 2 input boxes


    An inputbox is not the same as a textbox. .


    If what you need is a textbox them my solution does not work.


    Please include all the details of what you want to accomplish. Also if possible include a sample file so it can be debugged.


    Thanks

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!