Results 1 to 3 of 3

Thread: merging cells in between two colors

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2009
    Posts
    1

    Question merging cells in between two colors

    I have a worksheet that sorts out different jobs and completion dates that I am attempting to automate. The last thing I need is to have certain parts of the worksheet merge together. So basically in the sheet there are grey rows that represent the main job and underneath there are white rows that describe certain tasks. I need code that will go through the worksheet and for a specific column, take the white parts in between two gray rows and merge them together because the information is the same. I need it to be dynamic because sometimes there are no tasks in between two greys ( grey = 15) and sometimes there are 5. Can anyone help me out.

    ex/

    PSM 252 Data Management 3 01-Apr-05
    PSM 252 Data Management 3 01-Apr-05
    PSM 252 Data Management 3 01-Apr-05
    MFTS 177 Research 3 01-Apr-05
    PSM 389 Data Management 1 13-Apr-05


    so the two record numbers that say 252 in black under the original in grey would be merged.

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: merging cells in between two colors

    how are the cells coloured? if by conditional formatting it is quite difficult to determine the colour of the cell by code
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  3. #3
    Hyperactive Member
    Join Date
    Jun 2006
    Posts
    272

    Re: merging cells in between two colors

    please explain, you are asking while you in generating crystal reports or in VBA?
    DONT RUN EXECUTABLE FILES FROM UNKNOWN SOURCES.

Posting Permissions

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



Click Here to Expand Forum to Full Width