Cat On A Spreadsheet
In the last post, we built a clean, modern-looking UserForm for entering customer data into Excel. That worked well for data entry, but real-world users often want more:
Browse through existing records
Search for specific entries
Edit and update records
Delete old or incorrect data
In other words, they want a mini database app inside Excel. Let’s build that.
We’ll work with a Customers sheet that has the following columns:
A: Name | B: Email | C: Phone | D: Type
Our UserForm will now have:
Input fields (as before: txtName, txtEmail, txtPhone, cboType)
Navigation buttons (btnNext, btnPrevious)
Action buttons (btnSave, btnDelete, btnNew)
A hidden variable to track the current row being viewed
We’ll store the row number of the current record in a module-level variable:
We can add Next and Previous buttons to scroll through rows.
If the user makes edits, clicking Save should overwrite the current row.
We’ll clear the form and append the record at the bottom of the sheet.
Deleting means clearing the row and shifting up the remaining records
Let’s allow the user to search by name.
Finally, when the UserForm opens, load the first record:
With a few extra buttons and some well-structured VBA, you’ve transformed a simple UserForm into a CRUD app:
Create: Add new customers
Read: Browse and search records
Update: Edit existing entries
Delete: Remove records
It’s not a full database, but for many small business or team applications, this approach is powerful enough to manage data smoothly—without leaving Excel.
Cat On A Spreadsheet