replacing .End(xlUp) with a set value

Clash Royale CLAN TAG#URR8PPPreplacing .End(xlUp) with a set value
I am using some code I found on this site to transpose a section of a table
Copy Partial Table and Insert N-times, then Transpose second part of table
however I have found that it is not transposing the data beyond the last filled cell in the range being transposed, resulting in mis-alignments of the data in the resulting table. I believe it is due to the .End(xlUp) reference in the last line of the code.
tws.Cells(tws.Rows.Count, dataClmStrt + 2).End(xlUp).Offset(1).Resize(38, 1).Value = Application.Transpose(rng.Offset(, dataClmStrt).Resize(, 38))
Is this the cause of the issue and if so can this term be replaced with a set value?
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.