Modified Excel migration functions into var