Okay, the formula is not a pretty one but it works. I modified one that I found for removing blanks from columns and adapted it to return the value from the first row (your Course Titles) and removing blanks from rows. It is an array formula which means that after you enter it into your first cell, then you (while still in the formula bar) need to confirm it with CNTRL SHFT ENTER. Then you can drag it down and across. Here is the formula based on the information that you gave us
=IF(COLUMN()-COLUMN(Sheet1!$C2:$V2)+1>COLUMNS(Sheet1!$C$2:$V$2)-COUNTBLANK(Sheet1!$C2:$V2),"",INDIRECT("SHEET1!"&ADDRESS(1,SMALL((IF(Sheet1!$C2:$V2<>"",COLUMN(Sheet1!$C2:$V2),COLUMN()+COLUMNS(Sheet1!$C2:$V2))),COLUMN()-COLUMN(Sheet1!$C$2:$V$2)+1),4)))
The array basically looks column by column and subtracts out the blanks. Sheet1! is the sheet where your original table is. $C2:$V2 is where your first student information is. See if you can modify it for your data (if it needs modification). Let us know if it worked.
Bookmarks