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.