I have an excel with multiple columns (20 in total) with each column containing multiple rows (5000 each). I want to replicate each cell from one row and all the columns 3 times and add them one below the other. Then I want to do the same with the next row and so on until I have one output column with all the cells (across columns) replicated 3 times and appended to each other.
The input data (sample)
v1 v2 v3
1 3 5
2 4 6
and so on.
The output data (sample)
Output
1
1
1
3
3
3
5
5
5
2
2
2
4
4
4
6
6
6
I found a similar question here, which suggested using rep
function. But the difference is that while the entire column in being replicated there, I need to replicate each cell from each column. Please suggest me some edits to make it work.
Thanks.
Looping through Columns replicating each column fetched six times