Bring data from columns to row using excel VBA

I have a data in excel sheet in row wise and need to bring in column, so kindly help me on this. please find the below sample input data and how i should get output data.

e.g If the student have 2 subjects then add new rows to update columns data to new row. as given below screen in output data.

Input Data Sheet
Student Name City Class Subject Name Subject Score Raiting English Score English Raiting Maths Score Maths Raiting Science Score Science Raiting
John Hyderabad 10th 99 A+ 50 C
Seema Mumbai 10th 86 A 50 C
Gopi Pune 10th 50 C 87
Rahul Bengaluru 10th 45 C 88 A 50 C
Output Data Sheet
Student Name City Class Subject Name Subject Score Rating English Score English Rating Math’s Score Math’s Rating Science Score Science Raiting
John Hyderabad 10th Maths Score 99 A+
John Hyderabad 10th Science Score 50 C
Seema Mumbai 10th English Score 86 A
Seema Mumbai 10th Science Score 50 C
Gopi Pune 10th English Score 50 C
Gopi Pune 10th Maths Score 87 A+
Rahul Bengaluru 10th English Score 45 C
Rahul Bengaluru 10th Maths Score 88 A
Rahul Bengaluru 10th Science Score 50 C

 

Top Contributor Asked 4 hours ago in VBA.
Add Comment
0 Answer(s)
  • Found this useful?

    Please share using the share button above.

    If you found the answer is best answer for your question, Please mark as 'best answer' by clicking on the right tick mark icon at the left side of the answer.

    Found the answer useful and wants to credit the user, then vote the answer (vote up).

  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.