Search working but not correct!

  • I have the following coding to search for a user, everything works OK but I can't seem to get the results that I want displayed right.


    This is what I'm doing:
    Select date from a drop down list and press search - working


    Have the results show me the name (column a), location (column g) and the tutor (column h) from a sheet called 'Users'.


    The results come back with:
    Name (column a) department (column b) and job title (column c).


    Can someone enlighten me as to what I'm doing wrong please?



    Thank you in advance.

  • Re: Search working but not correct!


    Appears to me you are copying the entire rows and should be getting everything.
    Do you have merged cells ?

  • Re: Search working but not correct!


    No merged cells. I'm still learning VBA and copied the code from elsewhere and playing around. Would you be kind enough to point me in the right direction as what to change?


    Thanks.

  • Re: Search working but not correct!


    I don't know what to change because I can't see what's happening.


    I suggest you put a break point, F9, on the r=1 line then step through the code one line at a time with the F8 key and flip flop back and forth between the VBE and the sheets to see what actually happens when each line of code is executed.
    You should then see what's being copied, where and what is being pasted, etc.

Participate now!

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