I want to convert data from horizontal rows to vertical rows

Copper Contributor

Please find the attachment. I have shown attached excel, that what I am trying to achieve. Please let me know if that is achievable in excel.

 

Thanks

7 Replies

@Debasmita23 

 

Transpose!
Copy values -> right click -> paste contents -> check mark for transpose


Hope I could help

 

Nikolino

I know I don't know anything (Socrates)

@NikolinoDE  

Hi Nikolino, Thank you for your reply. I tried that but didn't get my desired output

 

Debasmita23_0-1625130131916.png

whereas I need this, I wonder if this is possible in excel or not

Debasmita23_1-1625130195614.png

 

 

@Debasmita23 

There are many ways that lead to Rome .... again as many possibilities in Excel to approach a problem, let alone the vast number of suggested solutions that arise from it.
Simplified: Everything is possible with Excel ... if not everything, then most of it :)).

 

Here is a suggested solution with a formula.

TRANSPOSE function

Sometimes you need to switch or rotate cells. You can do this by copying, pasting, and using the Transpose option. But doing that creates duplicated data. If you don't want that, you can type a formula instead using the TRANSPOSE function.

 

Thank you for your understanding and patience

 

 

Hope I could help

 

Nikolino

I know I don't know anything (Socrates)

@Debasmita23 

(Kind reminder :) From Welcome to your Excel discussion space!:
- Device and OS platform, e.g., PC/Windows 10 or Mac/macOS Big Sur 11.2.1
- Excel product name and version number

 

A Power Query solution attached:

Demo.png

Hi, Can you please tell me the procedure or the formula used here to achieve this? I have at least 10,000 data

@Debasmita23 

Afraid to say that 10,000 data is very confusing
- Is this 10,000 rows * n pairs of columns (same date in 2 columns then "page views" & "visitors" below)?
Or, something else? in which case it's better you upload another workbook that reflect your actual setup
- It's not realistic to explain each and every Power Query step. So, if you upload a workbook reflecting your actual setup (not 10,000 rows please) I'll be glad adjusting the query (assuming it's doable) and the only things you'll have to do:

  • Copy/paste all your values in the grey table
  • Right-click > Refresh in the green table (output of the query)
Assume that your knowledge of Array Formulas and Pivot Tables is limited.
As a proposed solution, VBA could be added with a macro running a standard procedure. but that would be standard for all entries.
Otherwise you could do it with formulas, but there would also be different formulas in different cells.
Both take time, which unfortunately I don't have at the moment.
Maybe later, if no other solution is available by then.