I have attached a small part of a large excel spreadsheet (MS SQL 2008 qry output) "raw_data" that I need to reformat as shown in the "sample_output" sheet.
The subject and VisitID columns are identical in the raw_data and "sample_output" sheets.
I need to automate the reformating of the "Date drawn:" , "Time drawn" and the value in the cell above these two cells (drug level) as shown in the "sample output sheet" ie, the Date drawn, Time drawn and drug level values for each SubjectID/VisitID in the "raw_data" sheet need to be moved into the corresponding rows for subjectID and visitID for all subjects and visit IDs in the "sample_output" sheet.
Many subject visits have no data - those cells should be left blank in the output file.
Thanks. Please advise.