Link to home
Start Free TrialLog in
Avatar of Rob M.
Rob M.Flag for United States of America

asked on

Excel VBA and SQL Server Stored Procedure Evaluating an Excel Empty Cell

Hello,

I have an macro and spreadsheet that contains the following columns: studentname, course, startdate, enddate and enrollmentstatus. I have a Microsoft SQL Server stored procedure that evaluates each row in the Excel spreadsheet. If today's date is between the startdate and enddate then the enrollment status is set to "ActiveEnrollment". If today's date is less than the startdate or today's date is greater than the enddate then the enrollmentstatus is set to "InactiveEnrollment". If the startdate field is empty in Excel then I want to return "RegistrationIncomplete".

The stored procedure can evaluate the startdate and enddate cells if there is a date. However, I am not able to code the stored procedure to properly evaluate the empty cell.

I have included a script with the stored procedure (studentcoursevalidation) and a table (StudentCourseEnrollment). Also attached is the Excel Spreadsheet with the macro.

I would appreciate assistance in finding out how to properly evaluate an empty cell in Excel using a SQL Server stored procedure.

Thanks in advance.
Sample_Table_Setup_StoredProc.sql
Sample_Spreadsheet_1.xlsm
ASKER CERTIFIED SOLUTION
Avatar of Kyle Abrahams, PMP
Kyle Abrahams, PMP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Rob M.

ASKER

Thanks very much. I appreciate you answering my question so quickly.