FryGirl
Well-known Member
- Joined
- Nov 11, 2008
- Messages
- 1,376
- Office Version
- 365
- 2016
- Platform
- Windows
I know merged cells are bad, but the person I'm helping already has merged cells within their spreadsheet. Two questions...
1) I know thru VBA code how to unmerge a cell, but is there any way to count the number of cells that are merged and then copy the text to all of those cells. So example, if the first merged cell starts in R25, but goes thru x25. That's 7 cells. Can the VBA code determine there are 7 cells, copy the contents of R25 and then Resize by 7 and paste the results?
2) This is somewhat related. If the merged cells are white, can we skip that section and keep moving from left to right? Of course, once we hit the last column in the row, then we would start with the next row, row 26. All this would start with column L.
Thanks,
1) I know thru VBA code how to unmerge a cell, but is there any way to count the number of cells that are merged and then copy the text to all of those cells. So example, if the first merged cell starts in R25, but goes thru x25. That's 7 cells. Can the VBA code determine there are 7 cells, copy the contents of R25 and then Resize by 7 and paste the results?
2) This is somewhat related. If the merged cells are white, can we skip that section and keep moving from left to right? Of course, once we hit the last column in the row, then we would start with the next row, row 26. All this would start with column L.
Thanks,