Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88111

Transposing from range to end of data

$
0
0

I have this code, that has to transpose the data. Problem is, that i don't know how to make it dynamic, so it can transpose more than till column "O". But if there is 300 rows of data, it should be able to transpose that data down the columns.

Sub TransposeData()
    Range("A2:O15").Value = WorksheetFunction.Transpose(Range("A2:O8"))
End Sub

I have just a test data set here, but when i add more than 15 rows of data, it cant transpose it beyond the column "O".

Data set

After Transpose


Viewing all articles
Browse latest Browse all 88111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>