Results 1 to 9 of 9

Macro to copy and paste (transpose) data from column to row - How to automate values

Threaded View

  1. #1
    Registered User
    Join Date
    09-10-2019
    Location
    kent
    MS-Off Ver
    2016
    Posts
    12

    Macro to copy and paste (transpose) data from column to row - How to automate values

    I have managed to create a macro which would allow me to copy and paste an specific number of values from a column and then transpose those values into a specific row on a spreadsheet.

    here is the code..

    Range("G3").Select
    Application.CutCopyMode = False
    Selection.Copy
    Range("G2:G7").Select          '   (The column range I want to copy)
    Application.CutCopyMode = False
    Selection.Copy
    Range("I1").Select                '    (Row where the range of G2:G7) is now transposed)
    Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
    False, Transpose:=True
    Range("H2:H7").Select          '   (The second column range I want to copy)
    Application.CutCopyMode = False
    Selection.Copy
    Range("I2").Select                '   (Second Row where the range of H2:H7) is now transposed)
    Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
    False, Transpose:=True
    Range("H8:H13").Select        '   (The third column range I want to copy)
    Application.CutCopyMode = FalseSelection.Copy
    Range("I3").Select' ( Third Row where the range of H8:H13) is now transposed)
    Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
    False, Transpose:=True
    the problem is that this code only works up to certain number of rows... up till H13 for example, but if I want to this repeat this process up to row H600 (range of H600:H605) and pasting to I20 for example
    without copying and pasting this code hundreds of times, is there a way I can do this?

    Thanks for the responses.
    Last edited by davesexcel; 09-13-2019 at 09:30 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. I need a Macro script to copy a column, delete the additional rows and paste as transpose
    By mastersaanvi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-16-2018, 02:05 AM
  2. Replies: 5
    Last Post: 11-17-2014, 02:40 PM
  3. [SOLVED] Macro to find SKU in column; then copy data in row and paste special (values)
    By Starkey in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-13-2012, 06:05 AM
  4. VB Macro to automate copy and paste of data in cells.
    By haleakala17 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 08-20-2012, 10:06 PM
  5. Macro to copy and paste special values for column data and filter column data
    By ascottbag in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-10-2012, 02:15 PM
  6. Macro for copy paste values transpose
    By straggleyway in forum Excel General
    Replies: 0
    Last Post: 03-11-2009, 07:32 AM
  7. HELP....Is there a way to automate copy/paste special/transpose -
    By Mel in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-28-2005, 07:06 PM

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