+ Reply to Thread
Results 1 to 20 of 20

Transpose Ranger?

  1. #1
    Registered User
    Join Date
    03-17-2017
    Location
    Hell
    MS-Off Ver
    2010
    Posts
    172

    Transpose Ranger?

    Hello,

    Can 2 columns of cells be cut and pasted to next available empty cells in the same row using a macro? Can this be done at once with one macro or does it have to be done for each row?

    Thanks,
    Joe

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Transpose Ranger?

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-17-2017
    Location
    Hell
    MS-Off Ver
    2010
    Posts
    172

    Re: Transpose Ranger?

    Thanks John for replying. It does clear the contents but pastes them in columns J and K.

    I am sorry for not being so clear. The contents from G and H need to stay on the same row and go into the next 2 empty cells in that row.

  4. #4
    Registered User
    Join Date
    03-17-2017
    Location
    Hell
    MS-Off Ver
    2010
    Posts
    172

    Re: Transpose Ranger?

    Could you maybe test it out in the file that is attached? I appreciate it very much.

  5. #5
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,231

    Re: Transpose Ranger?

    Like this:
    Please Login or Register  to view this content.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  6. #6
    Registered User
    Join Date
    03-17-2017
    Location
    Hell
    MS-Off Ver
    2010
    Posts
    172

    Re: Transpose Ranger?

    Thank you for the reply Sintek. Unfortunately not exactly what I was after.

    If there are entries in J and K, L and M, then the next available would be in N and O on the same row for example. J and K are just the starting points for the data to be pasted to.

    Throughout the year this range will get filled and kept as a dynamic log.

    Thank you for helping

  7. #7
    Registered User
    Join Date
    03-17-2017
    Location
    Hell
    MS-Off Ver
    2010
    Posts
    172

    Re: Transpose Ranger?

    Also if possible could the borders be kept in tact when clearing contents?

  8. #8
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,231

    Re: Transpose Ranger?

    Hi LewisJ

    Now I understand...Right the code works, however will need to sort out the borders part.
    Please Login or Register  to view this content.

  9. #9
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,231

    Re: Transpose Ranger?

    Here you go amended code....
    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    03-17-2017
    Location
    Hell
    MS-Off Ver
    2010
    Posts
    172

    Re: Transpose Ranger?

    Almost got it! When there were not any entries it moved it to I and J instead of J and K. Also if you can check the borders part it would be great thanks so much.

  11. #11
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,231

    Re: Transpose Ranger?

    K this sorts out if empty.Not to sure about borders yet lol
    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    03-17-2017
    Location
    Hell
    MS-Off Ver
    2010
    Posts
    172

    Re: Transpose Ranger?

    Yes now they stay on the correct row. If there aren't any entries it pastes to I instead of starting in column J.

  13. #13
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,231

    Re: Transpose Ranger?

    K, here is final code.....Third time lucky.
    Please Login or Register  to view this content.

  14. #14
    Registered User
    Join Date
    03-17-2017
    Location
    Hell
    MS-Off Ver
    2010
    Posts
    172

    Re: Transpose Ranger?

    Still starting in column I instead of column J when there aren't any entries.

  15. #15
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,231

    Re: Transpose Ranger?

    And so .......we learn......Done and dusted.
    Please Login or Register  to view this content.

  16. #16
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Transpose Ranger?

    Try:

    Please Login or Register  to view this content.

  17. #17
    Registered User
    Join Date
    03-17-2017
    Location
    Hell
    MS-Off Ver
    2010
    Posts
    172

    Re: Transpose Ranger?

    Brilliant!!!

    Thank you very much for the fantastic help. So sorry it took so much of your time.

    Take care,
    Joe

  18. #18
    Registered User
    Join Date
    03-17-2017
    Location
    Hell
    MS-Off Ver
    2010
    Posts
    172

    Re: Transpose Ranger?

    Thanks John but it seems that Mr. sintek has a perfect solution.

  19. #19
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,231

    Re: Transpose Ranger?

    Quote Originally Posted by LewisJ View Post
    Brilliant!!!

    Thank you very much for the fantastic help. So sorry it took so much of your time.

    Take care,
    Joe
    Pleasure Joe...Love learning....Thanks for the rep point.

  20. #20
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Transpose Ranger?

    You're welcome. Glad you got the desired result.

+ 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] Use the TRANSPOSE() function to transpose a range as an input to the UDF
    By alice2011 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-09-2015, 09:35 PM
  2. transpose column to a range calculate and transpose to new table loop
    By moshro1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-02-2015, 10:52 AM
  3. [SOLVED] Transpose: How can I copy a list and transpose it but leaving 3 cells in between each item
    By cocolete in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-11-2012, 10:01 AM
  4. If column contains values between a certain ranger, delete the entire row
    By kibbles in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-28-2011, 11:31 AM
  5. Query Hide State of Column Ranger and Hide if False
    By Orson100 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-18-2009, 07:51 AM
  6. Replies: 2
    Last Post: 02-19-2007, 04:53 PM
  7. Subscript out or Ranger Error 9 - I'm lost here!
    By halem2 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-01-2006, 05:30 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