![]() |
Find a merged cell
Hi All
How can I programmatically find and select a single merged cell in a spreadsheet. The sheet doesnt have a continuous area but there is only one merged cell in a variable row from A:N. Many Thanks |
Find a merged cell
Sub findmerge()
For Each r In ActiveSheet.UsedRange If r.MergeCells = True Then r.Select Exit Sub End If Next End Sub -- Gary''s Student - gsnu200846 "Jimbob" wrote: Hi All How can I programmatically find and select a single merged cell in a spreadsheet. The sheet doesnt have a continuous area but there is only one merged cell in a variable row from A:N. Many Thanks |
Find a merged cell
Thanks - it works a treat and is much more elegant than my "creations".
You guys are so good and quick in responding. What a service. "Gary''s Student" wrote: Sub findmerge() For Each r In ActiveSheet.UsedRange If r.MergeCells = True Then r.Select Exit Sub End If Next End Sub -- Gary''s Student - gsnu200846 "Jimbob" wrote: Hi All How can I programmatically find and select a single merged cell in a spreadsheet. The sheet doesnt have a continuous area but there is only one merged cell in a variable row from A:N. Many Thanks |
Find a merged cell
Responding is fun, try it.
-- Gary''s Student - gsnu200846 "Jimbob" wrote: Thanks - it works a treat and is much more elegant than my "creations". You guys are so good and quick in responding. What a service. "Gary''s Student" wrote: Sub findmerge() For Each r In ActiveSheet.UsedRange If r.MergeCells = True Then r.Select Exit Sub End If Next End Sub -- Gary''s Student - gsnu200846 "Jimbob" wrote: Hi All How can I programmatically find and select a single merged cell in a spreadsheet. The sheet doesnt have a continuous area but there is only one merged cell in a variable row from A:N. Many Thanks |
All times are GMT +1. The time now is 09:33 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com