Hey everyone,
I'm very new to VB and having difficulty merging a large group of cells through a macro.
Basically I need to merge certain cells in a specific way to uphold formatting but also able to unmerge them as Excel->Outlook->Excel copy pasting doesn't work very well.
For example to unmerge cells I can grab a large group of them:
Range("D3:P14,D16:P27,D29:P40,D42:P53,D55:P66").Select and then select Selection.Unmerge. Unfortunately probably due to how unrefined this is, doing this method over roughly 10 times, the code starts breaking and certain cells aren't being unmerged.
Alternatively, I need to merge these cells back into more Specific ranges (as they started) Example:
Range("D3:P3,D4:P5,").Select
Selection.Merge
Same problem, when I go more than a few lines deep, the code breaks, again because I know this is not the proper way to do this, it's mostly what I've learned through the record feature.
Thanks for all your help with this one!
Bookmarks