LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Data in f a Merged area

hi
no. when dealing with merged cell, you skew off into a totally different
concept.
note: i am totally opposed to using merged cells. dumbest thing excel
programers ever came up with. it may look pretty on the sheet but it screws
everthing else up.
so....stop using keywords that apply to unmerged cells(normal cells). use
keywords that do apply to merged cells. such as MergeCells...MergedArea. Oh!
didn't know about those. look them up in VB help.
to find merged cells on your sheet, use something like this.....
Sub isitmerged()
Dim c
For Each c In ActiveSheet.UsedRange
If c.MergeCells Then
MsgBox c.Address & " is merged"
End If
Next
End Sub
this does not solve your problem but does illistrate the problems created by
using merged cells. see note above.
to get the value of merged cells, make sure that all of the value are in the
upper left cell of the merged area. even though you see merged cells on the
sheet, excel is still seeing the grid and just making a side note about the
merged cells.
Sub whatisit()
Dim c As Range
Set c = Range("B2")
If c.MergeCells Then
mergedinfo = c.MergeArea
MsgBox c.Value
End If
End Sub

so once again, when using merged cells, even with vb, you are entering into
the...... "other" ......world.

in the long run, best not to even use merged cells. see note above.
if this doesn't make sense, do a google on merged cells to get more confused.

Regards
FSt1

"Bruce A. Julseth" wrote:

With VBA, how can I get the data for a merged area? I can reach a cell in
via "Offset" but don't know the boundaries and don't know the location of
Cell(1,1) of the merged area. Isn't the data located in Cell(1,1) of the
merged area?

Thanks for your help...


.

 
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
Autofit Merged cell Code is changing the format of my merged cells JB Excel Discussion (Misc queries) 0 August 20th 07 02:12 PM
Macro - Set Print Area for Changing Data Area ksp Excel Programming 5 May 15th 06 10:20 PM
Sorting Area with Merged Cells prizm1 New Users to Excel 3 September 10th 05 11:49 PM
I can't see the data (###) in a merged area? rakpak Excel Discussion (Misc queries) 3 June 21st 05 06:49 PM
pivot table+put unique data in 'row area'+count of items in 'data area' bubz Excel Programming 0 August 31st 04 04:22 AM


All times are GMT +1. The time now is 06:54 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"