0
In the Worksheet "BASE" I enter various customer data (NIF, name, address, telephone, email). I have a Worksheet "DATA" where you have a list of several clients.
I need to create a button on the Worksheet "BASE" that copies the data from the client to the Worksheet "DATA" if it does not exist based on the NIF but if it exists updates the information on the Worksheet "DATA".
I also need to create a button in the Worksheet "BASE" that searches in the WS "DATA" a certain "NIF" and copies the information to the WS "BASE".
I hope you can help me. I don’t have much experience with vba and this will save me a lot of work.
Thank you
At Plan1 (BASE) I only have one line with information. In Plan2 (DATA) I have my total database to which I want to add more "clients" and complete the existing information. So, if there is no NIF add one more line in Plan2 with this information. If there is NIF replace this line with new information.
– MCardoso
@Mcardoso edited the answer, added the copy of the data for when he finds the NIF in the other table. As for you having only one line, it is not a problem, the code will run while there are filled lines, so you add only one as said, or add N lines and it will run while there are lines to check.
– Felipe Chagas