Excel User Group
Microsoft Excel blogs, forums, files. Read, ask questions, provide answers.

Macro - Column to Row

Latest post Sat, Feb 23 2008 4:02 AM by Nick Hodge. 3 replies.
  • Fri, Feb 22 2008 7:49 AM

    Macro - Column to Row

    Hello,

    I am looking for help creating a Macro to copy a list of information in cells A1 to A5 to A1 to E1.

    Thanks,

    Jim

    • Post Points: 21
  • Fri, Feb 22 2008 9:26 AM In reply to

    • Nick Hodge
    • Top 10 Contributor
    • Joined on Sun, Dec 23 2007
    • Southampton
    • Posts 336
    • Points 5,771
    • MVP

    Re: Macro - Column to Row

    Jim

     I doubt this is the full extent of your issue, but using you example...

    Sub TransposeRng()
    Range("A1:E1").Value = Range("A1:A5").Value
    Range("A2:A5").Clear
    End Sub

    Post back when you want this done for many columns Wink

    Regards
    Nick Hodge
    Microsoft MVP, Excel
    Southampton, UK

    Filed under: ,
    • Post Points: 21
  • Fri, Feb 22 2008 10:11 PM In reply to

    • Alex J
    • Top 25 Contributor
    • Joined on Wed, Jan 9 2008
    • Posts 21
    • Points 349

    Re: Macro - Column to Row

    Nick,

    Did you mean to say

    Range("A1:E1").Value = Application.Transpose(Range("A1:A5").Value)

    Ick!

     

    Regards, Alex J

    • Post Points: 21
  • Sat, Feb 23 2008 4:02 AM In reply to

    • Nick Hodge
    • Top 10 Contributor
    • Joined on Sun, Dec 23 2007
    • Southampton
    • Posts 336
    • Points 5,771
    • MVP

    Re: Macro - Column to Row

    Alex

    I did indeed, teach me for trying to rush a post from work...thanks for the correct

    Embarrassed

    Regards
    Nick Hodge
    Microsoft MVP, Excel
    Southampton, UK

    • Post Points: 5
Page 1 of 1 (4 items) | RSS
Copyright Excel User Group and the relevant contributors, 2008. All Trade Marks acknowledged. This site is a peer-to-peer site and NOT affiliated in any way to Microsoft Corp. All rights reserved.