+ Reply to Thread
Results 1 to 9 of 9

pair up data from consecutive cells in a column

  1. #1
    Registered User
    Join Date
    04-13-2008
    Posts
    24

    Wink pair up data from consecutive cells in a column

    Is there a way to pair up data from consecutive cells in a column? Please see attached. Regards.

  2. #2
    Forum Contributor Portuga's Avatar
    Join Date
    02-20-2004
    Location
    Portugal
    MS-Off Ver
    365
    Posts
    852
    Hi,

    This solution is not pretty but it works.
    (non vba)

    See attached

    You can use this method until you get a more elegant solution.
    Attached Files Attached Files
    If you found the solution to your question. Mark the thread as "Solved"
    Thank everyone that helped you with a valid solution by clicking on their

    There is no such thing as a problem, only a temporary lack of a solution

  3. #3
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    try
    Please Login or Register  to view this content.

    rylo

  4. #4
    Registered User
    Join Date
    04-13-2008
    Posts
    24
    hi Portuga.
    Yes it works.
    So it is pretty. Thanks.

  5. #5
    Registered User
    Join Date
    04-13-2008
    Posts
    24
    hi rylo,

    though I am novice, I can see the beauty of your code.
    never used macros. may I ask some hint from you? (e.g., where to put it)

    regards,


  6. #6
    Forum Guru mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,206
    This spreadsheet formula, put in C2 and dragged down is another way.

    =OFFSET($A$2,(ROWS($A$2:A2)-1)*2,0,1,1) & OFFSET($A$2,(ROWS($A$2:B2)-1)*2+1,0,1,1)
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  7. #7
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    When you are in Excel, hold down the alt key and press F8. In the macro name put in something like aaa, then select create. This will open the Visual Basic Editor, and create a module with the start of a code block. Something like

    Please Login or Register  to view this content.
    Put the code I gave you into this area, then go back to your spreadsheet, again press alt and F8,select the code and run.

    rylo

  8. #8
    Registered User
    Join Date
    04-13-2008
    Posts
    24

    hi Mike,

    It works nicely. It motivates me to learn the "OFFSET" function.
    Many thanks.

  9. #9
    Registered User
    Join Date
    04-13-2008
    Posts
    24

    Hi Rylo,

    Today is memorable. My first macro!
    It opens doors for me.
    Thanks heaps.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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