Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 391
Default Merged Cells in Worksheet, Test for

XL 2003

Simple way to test for existence of any merged cells in worksheet.

Must it be a cell by cell evaluation OR [Each myCell in myRange]
is there a "merged state" that is reflected on a Sheet basis?
[ i.e. like Activesheet.UsedRange.MergeCells]

EagleOne
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 179
Default Merged Cells in Worksheet, Test for

Hi EagleOne

search in the VBA-Help for MergeCells

Hth Carlo

" wrote:

XL 2003

Simple way to test for existence of any merged cells in worksheet.

Must it be a cell by cell evaluation OR [Each myCell in myRange]
is there a "merged state" that is reflected on a Sheet basis?
[ i.e. like Activesheet.UsedRange.MergeCells]

EagleOne

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 68
Default Merged Cells in Worksheet, Test for

Merged Cells in Worksheet, Test for

Ultimately I found a way to determine, on a Sheet-level basis if there
are merged cells on the sheet somewhere (without having to examine each
cell in the used range). This is important, because it saves time on
very large worksheets.

NOTE: this works in XL 2003, not sure for older versions.

Sub SheetLevelTestForMergedCells()

If Cells.MergeCells = False Then
MsgBox "No Merged Cells on this Sheet!"
Else
MsgBox "Merged Cells Found!"
End If

End Sub

For some reason, neither

Cells.MergeCells = True

nor

Cells.MergeCells = Null

works in the reverse. BTW, if someone finds inconsistencies please
post back.



wrote:
XL 2003

Simple way to test for existence of any merged cells in worksheet.

Must it be a cell by cell evaluation OR [Each myCell in myRange]
is there a "merged state" that is reflected on a Sheet basis?
[ i.e. like Activesheet.UsedRange.MergeCells]

EagleOne


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
Calculating only non-empty cells... Jay Excel Worksheet Functions 9 September 22nd 06 03:20 AM
Copying a column of single cells into a column of merged cells [email protected] Excel Discussion (Misc queries) 1 August 16th 06 01:18 PM
How can I have formatting toolbar active for the unprotected(unlocked) cells of the protected worksheet??? sanam Excel Discussion (Misc queries) 6 July 20th 06 01:42 PM
checking that cells have a value before the workbook will close kcdonaldson Excel Worksheet Functions 8 December 5th 05 04:57 PM
Linking cells in a worksheet to other worksheets in a workbook Dave Excel Discussion (Misc queries) 4 June 24th 05 06:18 PM


All times are GMT +1. The time now is 01:20 PM.

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"