+ Reply to Thread
Results 1 to 10 of 10

Vertical to horizontal form

Hybrid View

  1. #1
    Registered User
    Join Date
    06-17-2014
    Location
    London, England
    MS-Off Ver
    2007
    Posts
    5

    Question Vertical to horizontal form

    Hi, i have a simple question

    i have a huge list in this form

    item number1
    item spec1
    item number2
    item spec2
    item number3
    item spec3
    .
    .
    .

    all i need is converting to this

    item number1 item spec1
    item number2 item spec2
    item number3 item spec3
    .
    .
    .
    Transpozing dont work for me, coz list is huge

    For any help, i'll be appreciated

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Vertical to horizontal form

    Hi,

    Is that original list a single column or two columns. It's not clear and rather important

    Is the output requirement a single column list or two columns.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Vertical to horizontal form

    See attachment, does that help?
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    06-17-2014
    Location
    London, England
    MS-Off Ver
    2007
    Posts
    5

    Re: Vertical to horizontal form

    @Richard Buttrey

    original list is one column
    output is two(like this (number1-item spec1))

    @ragulduy
    Yes!. its the solution that i need.But how i use this as a continous form.
    Your solution is formula and i think i need a macro.Because i have 2k item

  5. #5
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Vertical to horizontal form

    Just copy the formula down 1000 lines or however long it us until you start getting 0's. If you want a macro though it would be something like:

    sub macro_1()
    dim count
    for count = Range("A" & rows.count).end(xlup).row to 2 step -2
      Range("C" & count-1 & ":D" & count-1).value = Range("A" & count & ":B" & count).value
      Range("A" & count & ":B" & count).delete shift:=xlup
    next count
    End sub

  6. #6
    Registered User
    Join Date
    06-17-2014
    Location
    London, England
    MS-Off Ver
    2007
    Posts
    5

    Re: Vertical to horizontal form

    @ragulduy

    thanks for your effort.but i pinned this point.Your example is slightly different from my example.

    http://s9.postimg.org/t6410j5n3/excel.jpg

    your example have more columns.mine is more basic.

    Can you modify for me ?

  7. #7
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Vertical to horizontal form

    sub macro_1()
    dim count
    for count = Range("A" & rows.count).end(xlup).row to 2 step -2
      Range("B" & count-1).value = Range("A" & count).value
      Range("A" & count).delete shift:=xlup
    next count
    End sub

  8. #8
    Registered User
    Join Date
    06-17-2014
    Location
    London, England
    MS-Off Ver
    2007
    Posts
    5

    Re: Vertical to horizontal form

    sorry, but its not worked.You can try on the list.
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Vertical to horizontal form

    Hi - try this:
    Sub Macro2()
    Dim count
    For count = Range("H" & Rows.count).End(xlUp).Row To 2 Step -2
          Range("I" & count - 1).Value = Range("H" & count).Value
      Range("H" & count & ":I" & count).Delete shift:=xlUp
    Next count
    End Sub
    I tested it on your example and it seemed to work ok.

  10. #10
    Registered User
    Join Date
    06-17-2014
    Location
    London, England
    MS-Off Ver
    2007
    Posts
    5

    Re: Vertical to horizontal form

    Oh god!, thats it. Thanks a lot!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Shifting Horizontal data to vertical form
    By pavanrn in forum Excel General
    Replies: 1
    Last Post: 11-12-2012, 06:27 AM
  2. Disabling users from vertical or horizontal scrolling on my form?
    By jonvanwyk in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-21-2010, 01:33 PM
  3. Horizontal to vertical
    By aaslezak in forum Excel General
    Replies: 4
    Last Post: 03-30-2009, 11:47 AM
  4. Horizontal To Vertical
    By khanjee in forum Excel General
    Replies: 3
    Last Post: 02-22-2008, 03:48 AM
  5. horizontal to vertical
    By mlecho in forum Excel General
    Replies: 1
    Last Post: 08-29-2007, 04:12 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1