I have a customer database with general information like name, address, phone number, etc., in Excel 2007. The first sheet has the details of current customers. The second sheet has the details of deleted/terminated customers.
Query on Managing Customer Records in Excel
Now my query is: "I want to delete a record of customer details. When I select that row and press the <Delete> key on the keyboard, that particular entire row should be deleted from the first sheet and automatically appended as the last row in the second sheet."
Someone suggested that it can be done by using Excel Macros/Micro functions, but I don't know how to go about it. Can anyone help me out in this matter? Or any other solutions, please.
From India, Mumbai
Query on Managing Customer Records in Excel
Now my query is: "I want to delete a record of customer details. When I select that row and press the <Delete> key on the keyboard, that particular entire row should be deleted from the first sheet and automatically appended as the last row in the second sheet."
Someone suggested that it can be done by using Excel Macros/Micro functions, but I don't know how to go about it. Can anyone help me out in this matter? Or any other solutions, please.
From India, Mumbai
How to Record and Run a Macro in Excel
Click on the View Menu. Select the last option of Macros. Click on Record New Macro. You can give the Macro Name, then select This Workbook and click OK. After that, you can do what you want, for example, delete or copy-paste in the second sheet.
After you have finished your work, again, click on the View Menu. Select the last option of Macros. Click on Stop Recording. After that, you can run the macro whenever you want. To run the macro, press Alt + F8 and click on Run. If you have any queries, you can attach your Excel sheet, and I will help you.
Regards,
Dnyan
From United Kingdom
Click on the View Menu. Select the last option of Macros. Click on Record New Macro. You can give the Macro Name, then select This Workbook and click OK. After that, you can do what you want, for example, delete or copy-paste in the second sheet.
After you have finished your work, again, click on the View Menu. Select the last option of Macros. Click on Stop Recording. After that, you can run the macro whenever you want. To run the macro, press Alt + F8 and click on Run. If you have any queries, you can attach your Excel sheet, and I will help you.
Regards,
Dnyan
From United Kingdom
Thank you, Altaf, for your reply. As you said, I filtered the data, selected the row, and gave the command to delete. How do you link the database? Will it solve my query of copying the data from the first sheet to the second sheet? We need both sheets—current customers and deleted customers—in our records.
From India, Mumbai
From India, Mumbai
Dnyan, thanks for your reply. Very nicely, you explained how to use macros. I did exactly as you told. It's showing me the current customer's database (after deletion). However, the solution that you gave is not giving me the desired result. I need both sheets in my records, i.e., the current customers and deleted customers.
From India, Mumbai
From India, Mumbai
Hi Xmastar I cant give you excat how to you without viewing your excel sheet. If you attach this excel sheet then I can give you solution. Regards Dnyan
From United Kingdom
From United Kingdom
I have attached the sample sheet of the customer database and step-by-step instructions of what exactly I want to do.
Screen-1: Customer database showing 2 sheets 'Current customers' and 'Deleted customers'.
Screen-2: Any one row is selected for deletion in the first sheet, 'Current customers'. Then the 'Delete' key from the keyboard or 'Delete' from the right-click of the mouse is selected. The entire row is deleted from the 'Current customers' sheet.
Screen-3: The deleted row is appended as the last row in the second sheet, "Deleted Customers" sheet.
I hope now my query is clear...
From India, Mumbai
Screen-1: Customer database showing 2 sheets 'Current customers' and 'Deleted customers'.
Screen-2: Any one row is selected for deletion in the first sheet, 'Current customers'. Then the 'Delete' key from the keyboard or 'Delete' from the right-click of the mouse is selected. The entire row is deleted from the 'Current customers' sheet.
Screen-3: The deleted row is appended as the last row in the second sheet, "Deleted Customers" sheet.
I hope now my query is clear...
From India, Mumbai
Hi, Check the attached excel file I think your query will be resolved. Regards Dnyan
From United Kingdom
From United Kingdom
My query is 99% solved. However, the remaining 1% remains unresolved. I was hoping to directly capture the keyboard "<DEL>" key or mouse "<delete>", but that seems to be a challenge. Nevertheless, I can accomplish what I need to by using the [Delete] button, so it's acceptable to me.
Thank you very much.
From India, Mumbai
Thank you very much.
From India, Mumbai
CiteHR is an AI-augmented HR knowledge and collaboration platform, enabling HR professionals to solve real-world challenges, validate decisions, and stay ahead through collective intelligence and machine-enhanced guidance. Join Our Platform.