Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a data range with merged cells and other cells not merged in a
spreadsheet. I want to find only the merged cells so I can store a lookup function in them using visual basic. My problem is I can't figure out either how to enter the function in the merged cells only and stop the loop so it doesn't go into my titles, which are merged cells, and enter the function in those. Any ideas? Thanks -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200801/1 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I, among many, do not believe in merged cells but assuming your titles in
row 1, try this Sub findmergedcells() For Each c In Range("e2:e22") If c.MergeCells = True Then MsgBox c.Row Next End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "Carrie_Loos via OfficeKB.com" <u34134@uwe wrote in message news:7e440d7506a12@uwe... I have a data range with merged cells and other cells not merged in a spreadsheet. I want to find only the merged cells so I can store a lookup function in them using visual basic. My problem is I can't figure out either how to enter the function in the merged cells only and stop the loop so it doesn't go into my titles, which are merged cells, and enter the function in those. Any ideas? Thanks -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200801/1 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks - works great
Don Guillett wrote: I, among many, do not believe in merged cells but assuming your titles in row 1, try this Sub findmergedcells() For Each c In Range("e2:e22") If c.MergeCells = True Then MsgBox c.Row Next End Sub I have a data range with merged cells and other cells not merged in a spreadsheet. I want to find only the merged cells so I can store a lookup [quoted text clipped - 6 lines] Thanks -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200801/1 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to delete rows in visual basic | Excel Discussion (Misc queries) | |||
Deleting rows in two columns with a code in visual basic | Excel Discussion (Misc queries) | |||
How to delete rows in visual basic | Excel Discussion (Misc queries) | |||
Can I run Visual Basic procedure using Excel Visual Basic editor? | Excel Programming | |||
Excel Visual Basic - need help to create a loop of filenames | Excel Programming |