Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
dk dk is offline
external usenet poster
 
Posts: 129
Default determine if sheet contains mergearea(s)

Is there any way to determine if a sheet contains mergearea(s) without
checking individual cells for MergedCell?

tia,
dk
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default determine if sheet contains mergearea(s)

Sub test()
Dim bGotMergedCells As Boolean
Dim vMerged As Variant

vMerged = ActiveSheet.Cells.MergeCells
bGotMergedCells = IsNull(vMerged) Or vMerged

MsgBox bGotMergedCells
End Sub

Regards,
Peter T

"dk" wrote in message
...
Is there any way to determine if a sheet contains mergearea(s) without
checking individual cells for MergedCell?

tia,
dk



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default determine if sheet contains mergearea(s)

If cells.MergeCells = Null then
' contains merged cells
elseif cell.MergeCells = True then
' whole sheet is one big merged cell
elseif cell.MergeCells = False
' no merged cells
End if



--
Regards,
Tom Ogilvy


"dk" wrote:

Is there any way to determine if a sheet contains mergearea(s) without
checking individual cells for MergedCell?

tia,
dk

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default determine if sheet contains mergearea(s)

that first line should be

if isNull(cells.MergeCells) then

--
Regards,
Tom Ogilvy


"dk" wrote:

Is there any way to determine if a sheet contains mergearea(s) without
checking individual cells for MergedCell?

tia,
dk

  #5   Report Post  
Posted to microsoft.public.excel.programming
dk dk is offline
external usenet poster
 
Posts: 129
Default determine if sheet contains mergearea(s)

Thanks

"Tom Ogilvy" wrote:

that first line should be

if isNull(cells.MergeCells) then

--
Regards,
Tom Ogilvy


"dk" wrote:

Is there any way to determine if a sheet contains mergearea(s) without
checking individual cells for MergedCell?

tia,
dk

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
Determine what sheets are linked to sheet A David Links and Linking in Excel 3 April 24th 08 06:03 PM
Content cell to determine which sheet to look at Mark Excel Discussion (Misc queries) 3 July 13th 07 01:13 PM
How do I determine automatically that a sheet is empty? [email protected] Excel Worksheet Functions 4 May 9th 05 08:15 PM
How to determine an opened sheet( Read Only) TTD Excel Programming 2 April 19th 05 04:49 PM
determine what sheet user is viewing Elias Excel Programming 1 September 27th 03 12:40 AM


All times are GMT +1. The time now is 03:10 PM.

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

About Us

"It's about Microsoft Excel"