Thread
:
visual basic Loop by rows in Excel
View Single Post
#
2
Posted to microsoft.public.excel.programming
Don Guillett
external usenet poster
Posts: 10,124
visual basic Loop by rows in Excel
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
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett