Results 1 to 9 of 9

Thread: How to arrange cells like this?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Senior Member
    Join Date
    Jun 2012
    Posts
    337
    Rep Power
    12
    or

    Code:
    Sub M_snb()
      sn=cells(1).currentregion
    
      for j=2 to ubound(sn)
        sn(j,1)=sn(j-1,1)
        sn((j,2)=sn(j-1,2) & " " & sn(j,2)
        sn((j-1,1)=""
        sn(j-1,2)=""
      next
    
      with sheets.add
        .cells(1).resize(j,ubound(sn,2))=sn
        .columns(1).specialcells(4).entirerow.delete
      end with
    End Sub
    Last edited by snb; 09-04-2017 at 11:37 AM.

Similar Threads

  1. Replies: 4
    Last Post: 08-20-2013, 06:28 PM
  2. Replies: 13
    Last Post: 06-10-2013, 09:05 AM
  3. Replies: 2
    Last Post: 09-24-2012, 11:19 PM
  4. Arrange the data by year and format.
    By pesteness in forum Excel Help
    Replies: 15
    Last Post: 08-19-2012, 08:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •