+ Reply to Thread
Results 1 to 3 of 3

VBA Code Required to Get Data Which is In Coloums Into Rows

  1. #1
    Registered User
    Join Date
    01-20-2005
    Posts
    2

    Unhappy VBA Code Required to Get Data Which is In Coloums Into Rows

    Dear All,

    I could really really do with some code which would allow me to get my data from rows into columns by this i mean i have my data in the form

    id_no picture_of
    1 cat
    1 dog
    1 horse

    and i would like in

    id_no picture1 picture2 picture3
    1 cat dog horse

    does anyone have the code for this - if so please i would be extremely extremely grateful.

    stu

  2. #2
    RB Smissaert
    Guest

    Re: VBA Code Required to Get Data Which is In Coloums Into Rows

    Try this:

    Sub test()

    Range(Cells(1), Cells(4, 2)).Copy
    Cells(4).PasteSpecial Paste:=xlPasteAll, _
    Operation:=xlNone, _
    SkipBlanks:=False, _
    Transpose:=True
    Application.CutCopyMode = False

    End Sub


    RBS


    "stublair" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Dear All,
    >
    > I could really really do with some code which would allow me to get my
    > data from rows into columns by this i mean i have my data in the form
    >
    > id_no picture_of
    > 1 cat
    > 1 dog
    > 1 horse
    >
    > and i would like in
    >
    > id_no picture1 picture2
    > picture3
    > 1 cat dog
    > horse
    >
    > does anyone have the code for this - if so please i would be extremely
    > extremely grateful.
    >
    > stu
    >
    >
    > --
    > stublair
    > ------------------------------------------------------------------------
    > stublair's Profile:
    > http://www.excelforum.com/member.php...o&userid=18702
    > View this thread: http://www.excelforum.com/showthread...hreadid=494127
    >



  3. #3
    Bob Phillips
    Guest

    Re: VBA Code Required to Get Data Which is In Coloums Into Rows

    Sub test()
    Range("C1:K1") = Application.Transpose(Range("A1:A10"))
    End Sub


    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "stublair" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Dear All,
    >
    > I could really really do with some code which would allow me to get my
    > data from rows into columns by this i mean i have my data in the form
    >
    > id_no picture_of
    > 1 cat
    > 1 dog
    > 1 horse
    >
    > and i would like in
    >
    > id_no picture1 picture2
    > picture3
    > 1 cat dog
    > horse
    >
    > does anyone have the code for this - if so please i would be extremely
    > extremely grateful.
    >
    > stu
    >
    >
    > --
    > stublair
    > ------------------------------------------------------------------------
    > stublair's Profile:

    http://www.excelforum.com/member.php...o&userid=18702
    > View this thread: http://www.excelforum.com/showthread...hreadid=494127
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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