how to convert rows to columns in excel code example
Example: rows to columns in excel
This webpage may help you:
https://support.microsoft.com/en-us/office/transpose-rotate-data-from-rows-to-columns-or-vice-versa-3419f2e3-beab-4318-aae5-d0f862209744
It explains how to transpose or rotate data from rows to colums or vice versa.