Macro to add, delete and edit data to a table

skf786

Board Regular
Joined
Sep 26, 2010
Messages
156
Hi,

im looking for a macro that can help me add, delete and edit data available in a table.

Input cells are A1:C1 (Reference number, customer name and phone number) and table starts from A5:c5 (has headers) and goes down as more data is added to it.

Add Data: User inputs data in cell a1:c1 and presses a Button 1 that adds the data at the last row in the table and returns to blank cell A1:C1.

Delete Data: User inputs reference number in cell a2 and presses a Button 2 that searches the reference number in the table and deletes the full row i.e. a to c and returns to blank cell A2.

Edit Data: User inputs reference number in cell a3 and inputs revised data in b3 and c3 and presses a Button 3 that searches the reference number in the table and replaces the full row with the new data (from a3:c3) and returns to blank cell A3:c3.

Many thanks for your help.

Best wishes,

skf
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
If you have no experience with macros you might want to give this a try.
You can still have a button that invoked the Data Entry Form.
 
Upvote 0

Forum statistics

Threads
1,215,016
Messages
6,122,700
Members
449,092
Latest member
snoom82

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top