Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 116
Default visual basic Loop by rows in Excel

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 116
Default visual basic Loop by rows in Excel

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to delete rows in visual basic Ruben Excel Discussion (Misc queries) 3 August 27th 08 09:43 AM
Deleting rows in two columns with a code in visual basic Ruben Excel Discussion (Misc queries) 5 August 27th 08 09:10 AM
How to delete rows in visual basic Ruben Excel Discussion (Misc queries) 3 August 20th 08 03:50 PM
Can I run Visual Basic procedure using Excel Visual Basic editor? john.jacobs71[_2_] Excel Programming 3 December 26th 05 02:22 PM
Excel Visual Basic - need help to create a loop of filenames dgates12 Excel Programming 3 May 12th 05 01:22 PM


All times are GMT +1. The time now is 09:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"