Using Input box to delete data in row without deleting the entire row

  • I have a spreadsheet that contains many columns of pt data. The worksheet is protected to prevent accidently deleting cells that have formulas in them. When a patient leaves the system, I would like the end user to click a button on the worksheet which will prompt them to enter the patient ID. Once the ID is entered, I would like a message box to pop up confirming the patient's name (from another column associated with the ID). If they confirm that it is the correct patient, the macro will either clear the content of all cells in that row that are not protected, or let me define in the macro the range of cells to clear the content. I want to preserve the row, and not delete it. I can easily create the button and assign the macro, just do not have much experience with Input boxes and defining the steps. Any help would be greatly appreciated. In the image attached, the Age column contains a formula and do not want the formula deleted, but do want the all of the other cells in that row cleared of any data. Thanks. Todd

    JOHN 1234567 3/15/1960 60      
    SUSAN 765432 12/28/1941 79      
    MIKE 246890 5/24/1964 56      
  • Hello and Welcome to the Forum :)

    You could test and adapt the following macro to your specific situation

    Hope this will help


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

Participate now!

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