Adding New Rows To Lookup Table

  • Hi,

    Need some help on how to add data text into cells using VBA on Excel, without overwriting current data.


    What i am trying to achieve is a program in which membership details (Name, Address) are shown via a VLookup, when users enter their Membership ID (E.G "103"). Knowing that a Vlookup requires a table of data, how will i add new members into the data sheet without overwriting the current?


    Is there a way to say "If cell "X" contains text, then skip it and move on to the next cell".


    Thanks in advance.

  • Re: Skipping Cells To Add Data


    Its not clear how are you posting the data to the table? is it via VBA code?
    While you are posting the data, you can use named range or other VBA methods to identify the last filled cell and enter the new data into the next row.


    Please attach the worksheet or paste your code and we can help.


    This is a very simple function, so don't worry it will be solved in minutes if you give right information.

    Thanks: ~Yogendra

  • Re: Skipping Cells To Add Data


    Quote

    how will i add new members into the data sheet without overwriting the current?

    Errr, how about adding them to the bottom and sort the new details in. Create a Dynamic Named Range for your Lookup table.

  • Re: Adding New Rows To Lookup Table


    Thanks for your replies.


    I have attached my whole project.


    What i want to achieve is to add new members when i click the "Add new member" button from the Form called "MembershipID". This button takes me to the form called "NewMembers", where people can input their information and add themselves into the data spreadsheet, called "Data".


    As you can see in the form called "NewMembers" i don't know what code to put into the button "Add Member", without replacing the current members in the data worksheet.


    All data can be found in the "Data" worksheet.


    Sorry, I'm new to Excel/VBA world and would GREATLY appreciate if anyone could help me out.


    Thanks in advance.

Participate now!

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