Is it possible to loop through merged cells in vba.
- I have 6 merged cells in the range
B4:B40 - I need the values in these 6 cells 6 iterations only.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The above answers look to have you sorted.
If you don’t know where the merged cells are then you can use the following routine to quickly detect them.
When I built Mappit! I realised that when I developed merged cell reporting that merged cells were part of
xlBlanksSo you can use the code to detect merged cells immediately rather than loop through each cell testing for the
MergedCellsproperty being true.