+ Reply to Thread
Results 1 to 2 of 2

# TRANSPOSE function macro with Selection.End(xlToRight)

  1. #1
    Registered User
    Join Date
    09-05-2013
    Location
    Private
    MS-Off Ver
    Excel 2010
    Posts
    45

    Question # TRANSPOSE function macro with Selection.End(xlToRight)

    Good Morning, I'm trying to write a macro to insert a Transpose function link from multi rows to a single column using [Range(Selection, Selection.End(xlToRight)).Select
    & Selection.FormulaArray= "=TRANSPOSE]


    Here is the raw macro with problem line [ Selection.FormulaArray= "=TRANSPOSE(Sheet1!RC:RC[124])"], I need this to link to what is copied in sheet1 for some reason the link is missed when the macro is run & it goes to EG =TRANSPOSE(Sheet1!A128:DU128) and not the wanted TRANSPOSE(Sheet1!A4:DU4)

    Please Login or Register  to view this content.
    Macro12 Macro
    '

    '
    Sheets("Sheet1").Select
    Range("A1").Select
    Selection.End(xlDown).Select
    Range(Selection, Selection.End(xlToRight)).Select
    Selection.Copy
    Application.CutCopyMode= FALSE
    Selection.Copy
    Sheets("transp").Select
    Range("A1").Select
    Selection.End(xlDown).Select
    ActiveCell.Offset(1, 0).Range("A1").Select
    Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
    False, Transpose:=True
    Application.CutCopyMode= FALSE
    [Selection.FormulaArray= "=TRANSPOSE(Sheet1!RC:RC[124])"
    Sheets("Sheet1").Select
    ActiveCell.Offset(1, 0).Range("A1").Select
    Range("A1").Select
    Selection.End(xlDown).Select
    Range(Selection, Selection.End(xlToRight)).Select
    Selection.ClearContents
    Selection.Copy
    Range("A1").Select
    End Sub[/CODE]

    Thanks, all comment appreciated ,

    Paul
    Last edited by Fotis1991; 01-29-2015 at 06:42 AM. Reason: # moderation sorry 1st code post

  2. #2
    Registered User
    Join Date
    09-05-2013
    Location
    Private
    MS-Off Ver
    Excel 2010
    Posts
    45

    Re: TRANSPOSE function macro with Selection.End(xlToRight)

    Here is my workbook with MACRO12 on it highlighted the problem line in RED
    Attached Files Attached Files
    Last edited by paulmacro; 01-29-2015 at 07:23 AM.

+ 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. Macro using Transpose function for multiple years of data
    By sd1030 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-07-2014, 09:41 AM
  2. Help - Insert method of Range class failed - Selection.Insert Shift:=xlToRight
    By sandy@excelforum in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-04-2012, 11:14 AM
  3. Macro to copy and transpose ANY data selection
    By TommyGato in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-08-2011, 12:30 PM
  4. Modified transpose function OR macro?
    By froffel in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-14-2009, 11:20 AM
  5. macro/function to transpose
    By oberon.black in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-25-2005, 11:05 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