

This second method has a bit more work to it, but once you get a hang of it, it will prove to be easier and faster than the first method. There is another way of converting your table’s rows into columns. You can now paste it into its original location or use it somewhere else. So, if you have followed the tutorial by creating a table from our example, you should end up having the following result.Īnd that’s all – you’ve successfully transposed your starting table. Your table will appear with its rows converted into columns.Once you have selected the field, right-click on it and select Paste special > Transposed.We will click on the empty A9 field and convert the table there, just so that you can compare the result with the original easier. Position your mouse to the empty field where you want your new (changed) table to start from – you can select the starting point of this table (A1) or click somewhere below.Right-click on the table and select Copy.The table’s color should change, signaling you that you have selected its parts. Just paste your data in the form below, press the Convert button, and columns will get converted to rows. You can also use the Shift and arrow keys to select the cells with your keyboard. Convert Columns to Rows in Text Files cross-browser testing tools Worlds simplest online text data column to row transformer for web developers and programmers. Select the entire table – just left-click, hold, and drag your mouse cursor across the entire table.Here’s the fastest way that you can do it.

This process is called transposing, and it only takes a few clicks. This has been applied to the entire table. ListRow = 1: Rem the row in column B that is getting writtenĭo Until Cells(dataRow, 1).Value = "" And Cells(dataRow + 1, 1).Value = ""ĭata = data & "," & Cells(dataRow, 1).As you can see, we have A1, B1, C1, D1 in the place where we previously had A1, A2, A3, and A4, and vice versa. So modified the routine and came up with the following, also I changed the variable names to meaningful names: Sub generatecsv()ĭataRow = 1: Rem the row that it is being read from column A otherwise known as 1 in vb script Reason, I had a client send me multiple keywords in list format for their website based on subject matter, needed a way to get these keywords into the webpages easily. example list title 1Īnd combines them of course into multiple rows, 1 per list.

I improved the generatecsv() sub to handle an excel sheet that contains multiple lists with blank lines separating both the titles of each list and the lists from their titles.
