+ Reply to Thread
Results 1 to 10 of 10

How to copy row and past it in to column

  1. #1
    Registered User
    Join Date
    01-26-2023
    Location
    Weggis, Switzerland
    MS-Off Ver
    Microsoft 365 Apps for Business Version 2102
    Posts
    13

    How to copy row and past it in to column

    Dear all I have a problem. I have found a way to copy and paste specific cells if the cell is false. When I do the paste it makes as it should pastes needed cells in rows but I need that it pastes the rows in to columns and in a specific column like "F" and not "A". can you help.

    her is the code:
    Please Login or Register  to view this content.
    Last edited by alansidman; 01-26-2023 at 05:40 PM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: How to copy row and past it in to column

    Code Tags Added
    Your post does not comply with Rule 2 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)

    However, if you continue to not use code tags, you can expect to have your thread BLOCKED until you add them yourself.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Valued Forum Contributor
    Join Date
    08-08-2022
    Location
    Buenos Aires
    MS-Off Ver
    Excel 2019
    Posts
    1,777

    Re: How to copy row and past it in to column

    Hi tumanovr. Try with:

    PHP Code: 
    Sub Macro8()
    Dim a
    With Worksheets
    ("Check In")
      
    With .Range("D3", .Cells(Rows.Count"D").End(xlUp))
        
    Evaluate("If(" & .Address(external:=True) & "=False, " & .Offset(, -2).Address(external:=True) & ")")
        
    Filter(Application.Transpose(a), FalseFalse)
      
    End With
    End With
    If UBound(a) > -1 Then Sheets("Sheet1").Cells(Rows.Count"A").End(xlUp)(2).Resize(UBound(a)) = _
      Application
    .Transpose(a)
    End Sub 
    Last edited by beyond Excel; 01-26-2023 at 11:10 PM.
    You are always very welcome if you add reputation by clicking the * (bottom left) of each message that has helped you.

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: How to copy row and past it in to column

    tumanovr,

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-26-2023
    Location
    Weggis, Switzerland
    MS-Off Ver
    Microsoft 365 Apps for Business Version 2102
    Posts
    13

    Re: How to copy row and past it in to column

    Thank you for the code.

    It copies the text which I need and all fine but when it pastes it pastes the down but I need that it pasts to the right

    This is how it pastes now

    q
    a
    s
    f
    n
    t
    j
    b
    g

    but I need like that

    q a s f n t j b g

  6. #6
    Valued Forum Contributor
    Join Date
    08-08-2022
    Location
    Buenos Aires
    MS-Off Ver
    Excel 2019
    Posts
    1,777

    Re: How to copy row and past it in to column

    Quote Originally Posted by tumanovr View Post
    ... but I need like that

    q a s f n t j b g
    Then try this other:

    PHP Code: 
    Sub Macro9()
    Dim a
    With Worksheets
    ("Check In")
      
    With .Range("D3", .Cells(Rows.Count"D").End(xlUp))
        
    Evaluate("If(" & .Address(external:=True) & "=False, " & .Offset(, -2).Address(external:=True) & ")")
        
    Filter(Application.Transpose(a), FalseFalse)
      
    End With
    End With
    If UBound(a) > -1 Then Sheets("Sheet1").Cells(Rows.Count"A").End(xlUp)(2).Resize(, UBound(a)) = _
      Application
    .Transpose(Application.Transpose(a))
    End Sub 

  7. #7
    Registered User
    Join Date
    01-26-2023
    Location
    Weggis, Switzerland
    MS-Off Ver
    Microsoft 365 Apps for Business Version 2102
    Posts
    13

    Re: How to copy row and past it in to column

    Worked perfect. Thank you

  8. #8
    Valued Forum Contributor
    Join Date
    08-08-2022
    Location
    Buenos Aires
    MS-Off Ver
    Excel 2019
    Posts
    1,777

    Re: How to copy row and past it in to column

    Quote Originally Posted by tumanovr View Post
    Worked perfect. Thank you
    Perfect is nice : thanks for the +rep.

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: How to copy row and past it in to column

    Quote Originally Posted by tumanovr View Post
    but I need like that

    q a s f n t j b g
    change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

  10. #10
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: How to copy row and past it in to column

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. [SOLVED] how to exclude a column from copy and past in vba
    By markswan111 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 01-27-2023, 02:43 PM
  2. VBA column only copy-past
    By hishams31x in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-10-2021, 07:06 AM
  3. Script to Copy from Column B and past in new Row underneath Column A
    By WildSpreadsheets in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-25-2019, 03:27 PM
  4. Automatic COPY and PAST entire Column to another sheet column
    By irfanfun in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-24-2014, 09:38 AM
  5. Copy & Past to the last row of a certain column
    By IKZOUHETNIETWETEN in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-03-2013, 10:44 PM
  6. VBA Copy and past with in a Column of a sheet
    By _google in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-02-2013, 02:13 PM
  7. Copy&Past Cell Value from one Column to another using VBA
    By bdb1974 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-29-2009, 01:45 PM

Tags for this Thread

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