Go to other cell based on matching values using button control

  • [TABLE="width: 448"]

    [tr]


    [td][/td]


    [td]

    a

    [/td]


    [td]

    b

    [/td]


    [td][/td]


    [td]

    c

    [/td]


    [td]

    d

    [/td]


    [td]

    e

    [/td]


    [/tr]


    [tr]


    [td]

    1

    [/td]


    [TD="align: left"]go button
    [/TD]

    [td][/td]


    [td]

    name list

    [/td]


    [td][/td]


    [td]

    date list

    [/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    2

    [/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    3

    [/td]


    [td]

    name

    [/td]


    [td][/td]


    [td]

    date

    [/td]


    [TD="align: right"]01/01/12[/TD]
    [TD="align: right"] 02/01/12[/TD]
    [TD="align: right"] 03/01/12[/TD]

    [/tr]


    [tr]


    [td]

    4

    [/td]


    [td]

    apple

    [/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    5

    [/td]


    [td]

    orange

    [/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    6

    [/td]


    [td]

    mango

    [/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [/tr]


    [tr]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [/tr]


    [/TABLE]
    hi there, I am bit stacked getting formula for going to specific cell. I have list of name and date + go to button;
    I want to match name and date from cell and go to particular cell. eg. from list if i select orange and 3/1/12, it will go to cell e5;
    much appreciable if any genius could help me out.
    thanks
    Moderator Edit: email address deleted

  • Re: Go to other cell based on matching values using button control


    hi there, I am bit stacked getting formula for going to specific cell. I have list of name and date + go to button;
    I want to match name and date from given cells value and cursor will go to particular cells . eg. from list if i select orange and 3/1/12, and hit "go to" button, cursor will go to cell e5;
    much appreciable if any genius could help me out.
    thanks

  • Re: Go to other cell based on matching values using button control


    Using the two find Methods listed on Ozgrid you can add this code to the button sub.


    Find method reference: http://www.ozgrid.com/VBA/find-method.htm
    Find Date reference: http://www.ozgrid.com/VBA/find-dates.htm



    Limitations: this code assumes that the sheet which you are editing will always be active while it is executing. We'd have to add more references to update it.


    cheers!
    Nate

  • Re: Go to other cell based on matching values using button control


    To navigate to, rather than select, the cell, change


    Code
    Cells(rName.Row, rDate.Column).Select


    To

    Code
    Application.Goto reference:=Cells(rName.Row, rDate.Column), scroll:=True
  • Re: Go to other cell based on matching values using button control


    menikhali,


    Please do not quote entire posts. When quoting follow these guidelines


    1. Quote ONLY if it is needed to add clarity or context for your reply. If so, then
    2. Quote ONLY the specific part of the post that is relevant - - not the entire post.


    This will keep thread clutter to a minimum and make the discussion easier to follow. Quote deleted.
    Thanks

  • Re: Go to other cell based on matching values using button control


    hi there, thanks for replying.
    when i debug, it shows ( strName="" and strDate=00:00:00 ); wheres
    range("b2").value and range ("c2").value showing their cells value


    additionally,
    set rName and rDate result showing "nothing"


    Plz clarify it
    a b c d e
    [TABLE="width: 353"]

    [tr]


    [TD="align: left"]

    1


    [/TD]

    [td]

    NameList

    [/td]


    [td]

    DateList

    [/td]


    [td][/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    2

    [/td]


    [td]

    orange

    [/td]


    [TD="align: right"]01/01/2012[/TD]

    [td][/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    3

    [/td]


    [td]

    date

    [/td]


    [TD="align: right"]01/01/2012
    [/TD]
    [TD="align: right"]02/01/2012
    [/TD]
    [TD="align: right"] 03/01/2012
    [/TD]

    [/tr]


    [tr]


    [td]

    4apple

    [/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    5oane

    [/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    5 mngo

    [/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [/tr]


    [/TABLE]

Participate now!

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