+ Reply to Thread
Results 1 to 5 of 5

Merging & multiplying cells

  1. #1
    Registered User
    Join Date
    03-21-2012
    Location
    Romania
    MS-Off Ver
    2010
    Posts
    23

    Merging & multiplying cells

    Hello,

    I want to merge some cells using a criteria. To be more specific, let's speak on the file attached.

    Beginning with the P5 cell I want to merge to the right groups of 4 cells for each name from the column J. Therefore the first group of merged cells will be P5:S5, the next group will be T5:W5 and so on until reaches 11 groups of 4 cells. The last group will be BD5:BG5.

    I tryied a script like this but it says that there is a syntax error on the "Else" instruction: Range(Range("AB5").End(xlToRight).Offset(0, 1), Range("AB5").End(xlToRight).Offset(0, nrCat)).Select

    Please Login or Register  to view this content.
    Thanks!
    Attached Files Attached Files
    Last edited by adygelber; 10-12-2012 at 10:54 AM. Reason: error in attachment

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Merging & multiplying cells

    on attached file you have no value in cell O2, then nrCat = ""
    nrCat = Range("O2").Value
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    03-21-2012
    Location
    Romania
    MS-Off Ver
    2010
    Posts
    23

    Re: Merging & multiplying cells

    sorry...you're right...I changed the file

  4. #4
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Merging & multiplying cells

    now you have merged range AB5:AE5, then what do you want obtain with ?

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-21-2012
    Location
    Romania
    MS-Off Ver
    2010
    Posts
    23

    Re: Merging & multiplying cells

    As I said, I want to merge to the right groups of 4 cells for each name from the column L. Therefore the first group of merged cells will be P5:S5, the next group will be T5:W5 and so on until reaches 11 groups of 4 cells. The last group will be BD5:BG5.

+ 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