Search and Replace complete row values

  • Hi

    I m need help to write VBA code for Search value from excel employee data base for replace employee duty any shift (due to any reason) with another employee from reserve . How write VBA for search reserve employee details and replace with employee code(unique) detailed. Please help asap.

  • Hello and Welcome to the Forum :)


    Do not know how familiar you are with Excel ...


    But, as a beginner, you could turn on your macro recorder ....

    and use Control H in order to replace ... and see the " VBA translation " of your actions ...


    You could, then, optimize your macro ...


    Hope this will help

    :)

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Thumbs Up" icon, below, in the bottom right corner:)

  • Thank you for reply..

    I can understand but if I do it as micro record for replace particular employee (its record specific range rows and column, ) here my problem not solve due to its replace always particular range. I want replace empid3. Now I selected employee code 3 and want it replaced with reserve employee with empire 13...How do it can help

  • Hello again,


    Your explanation is not very clear ...


    Could you modify your sample file to show the two situations : Before and After ...

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Thumbs Up" icon, below, in the bottom right corner:)

  • Hello,

    I m attaching files ,where workbook have sheets

    1-db(data base)

    2-search (main sheet ..Have 4 add button for add employee in shift 1,2,3 and 4 from reserve employee,like R01,R02...

    And another button for replaced employee (empid 1,2,3....)


    I have problem to delete employee details with respect input box (emp id -1,2....)from shift 1, 2 3 and 4.


    So please help to write bna for delete employee details row with respect input box, and replace a employee with reserve ..Also deleted employee details save on another sheet for backup(backemp sheet).


    Please help suggest best way anybody.

  • Hello Jay,


    Had a quick look at your workbook ... which is extremely confusing in many aspects ....


    First question is : at this stage, is it the macro called Sub Button1_Click() located in Module 1 that you need to fix ...?

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Thumbs Up" icon, below, in the bottom right corner:)