Updating data with userform, not working when having empty rows

  • Hello,


    I use an userform to populate a sheet, and this works fine.

    I have added the option to edit / delete data from the data-sheet, and that works, however it updates the wrong rows when there are empty rows in the data-sheet.

    Every row of data has an serial number, their are no doubles.


    The code that I am using, just for updating (found on a forum and adapted to my needs)

    How can I change the code so it will ignore the empty rows (if there are any).

    Overwriting the wrong rows is not an option.


    Hope someone can help me, really appreciate all the help.

  • Could you attach a copy of your file? It would be easier to see how your data is organized and to test possible solutions. Include a detailed explanation

    of what you want to do using a few examples from your data and referring to specific cells, rows, columns and sheets. De-sensitize the data if necessary.

    You can say "THANK YOU" for help received by clicking the "Like" icon in the bottom right corner of the helper's post.
    Practice makes perfect. I am very far from perfect so I'm still practising.

  • You need to get the structure of your workbook correct before doing any code. A data table should never have blank rows, better still is to have it as a built-in Excel Table

    We now have a reputation system in place. If my reply helped please "Like" the reply by clicking the "Like" icon at bottom right of my reply.

  • Hey,


    Thank you all for replying. I am working on a sample file so you guys can see how it works.

    The ID will be generate by the userform, but haven't implemented that code yet.

    When I have the file ready I will upload it here. (have to remove the confidential information first)


    Again thank you for the replies so far.

Participate now!

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