|
-
Aug 3rd, 2009, 04:04 PM
#1
Thread Starter
New Member
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.
-
Aug 10th, 2009, 07:09 AM
#2
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
-
Aug 10th, 2009, 11:18 AM
#3
Hyperactive Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|