The Problem
A financial services firm managed client portfolios using a SQL Server database as their system of record, but analysts needed to work with the data in Excel for daily analysis, reporting, and client communications. Every morning, a team member exported data from SQL Server, cleaned it up in Excel, distributed it to analysts, and at the end of the day, manually entered analysis results back into the database.
This daily round-trip took 2 to 3 hours. The export process alone involved running multiple SQL queries, saving results as CSV files, opening them in Excel, reformatting columns, and fixing data types that got mangled in the export. The re-entry process at day's end was even worse, someone had to manually type analysis results, notes, and updated valuations back into the database, row by row.
Copy-paste errors were a constant problem. Client names got mixed up, decimal points shifted, and data sometimes went into the wrong fields. The firm discovered several instances where incorrect data had been sent to clients in reports. Beyond the errors, the 2-3 hour daily overhead meant analysts had less time for actual analysis, which is what generated revenue.
The Solution
I built a custom Excel workbook that connects directly to the SQL Server database using ADO (ActiveX Data Objects) through VBA. The workbook pulls live data from the database on demand, no exports, no CSV files, no reformatting. Analysts click a "Refresh Data" button and get current client data in properly formatted Excel tables within seconds.
For the write-back process, I created a structured input form within Excel where analysts enter their analysis results, notes, and updated valuations. When they click "Submit," the VBA code validates all entries, checks for data type mismatches and out-of-range values, and then writes the data directly to the appropriate SQL Server tables using parameterized queries to prevent SQL injection.
I also built a reconciliation feature that compares the Excel working data against the database at the end of each day, flagging any discrepancies. This catches any issues before they propagate. The entire system includes detailed logging so there's a complete audit trail of every data read and write operation.
The Outcome
The daily data round-trip dropped from 2-3 hours to about 5 minutes. Over a year, the firm saves approximately 500 hours of manual data entry and cleanup. Copy-paste errors were completely eliminated since data flows directly between Excel and SQL Server without human transcription. The audit trail has also satisfied compliance requirements that were previously met with manual logs.
“He connected our Excel workbooks directly to SQL Server. Daily data entry dropped from 2–3 hours to about 5 minutes, over 500 hours saved per year with no transcription errors.”
