#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 36
Default Merge

How to find a merged cell in a work sheet full of data?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Merge

You can select a small range and then format|Cells|alignment tab and look at the
Merge box. If it's clear, there are no merged cells in the selection.

If there are, you divide your range into two parts and look at each part. Keep
dividing until you find all the cells that are merged.

Or you could use a macro:

Option Explicit
Sub testme()

Dim rptWks As Worksheet
Dim wks As Worksheet
Dim oRow As Long
Dim iCtr As Long
Dim myCell As Range

Set wks = Worksheets("sheet1")

Set rptWks = Worksheets.Add
rptWks.Range("a1").Value = wks.Name

oRow = 1
For Each myCell In wks.UsedRange.Cells
If myCell.MergeArea.Cells.Count 1 Then
If myCell.MergeArea.Cells(1).Address = myCell.Address Then
oRow = oRow + 1
rptWks.Cells(oRow, 1).Value = myCell.MergeArea.Address
End If
End If
Next myCell

End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Jithu wrote:

How to find a merged cell in a work sheet full of data?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 860
Default Merge

Hi Jithu,

I just had a little play, and this will work but could get
a bit tedious in a large sheet or if you are looking for
a lot of merged cells.

For what it's worth
Select A1 and then Ctrl+Shift+Down Arrow
If only column A is selected then there are no merged cells in A
Tap the up arrow, then the right arrow, then Ctrl+Shift+Down Arrow
If only column B is selected then there are no merged cells in B
Keep going until more than one column is highlighted, this will signify
a merged cell in that column.
Tap the up arrow, then hold down Shift and keep tapping the down
arrow, the selection will stay in one column until you reach the merged
cell.

Like I said a bit tedious but not so bad if you are just searching
for one rogue cell.

HTH
Martin


"Jithu" wrote in message
...
How to find a merged cell in a work sheet full of data?



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 860
Default Merge

And another one,

Tap F5
Click Special
Check Blanks
Click OK

Any highlighted cell that has a value in it should be
a merged cell.

HTH
Martin


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 36
Default Merge

Thanks a lot Dave. It saved one day of work for me

"Dave Peterson" wrote:

You can select a small range and then format|Cells|alignment tab and look at the
Merge box. If it's clear, there are no merged cells in the selection.

If there are, you divide your range into two parts and look at each part. Keep
dividing until you find all the cells that are merged.

Or you could use a macro:

Option Explicit
Sub testme()

Dim rptWks As Worksheet
Dim wks As Worksheet
Dim oRow As Long
Dim iCtr As Long
Dim myCell As Range

Set wks = Worksheets("sheet1")

Set rptWks = Worksheets.Add
rptWks.Range("a1").Value = wks.Name

oRow = 1
For Each myCell In wks.UsedRange.Cells
If myCell.MergeArea.Cells.Count 1 Then
If myCell.MergeArea.Cells(1).Address = myCell.Address Then
oRow = oRow + 1
rptWks.Cells(oRow, 1).Value = myCell.MergeArea.Address
End If
End If
Next myCell

End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Jithu wrote:

How to find a merged cell in a work sheet full of data?


--

Dave Peterson

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
Merge option is not available. How to undo merge in this case? Gauri Excel Discussion (Misc queries) 1 October 9th 06 09:58 AM
Merge two rows into one, then merge into mailer? tavat Excel Worksheet Functions 0 May 24th 06 07:52 PM
mail merge excludes my headers and critical data in Word merge Nix Excel Discussion (Misc queries) 0 April 21st 06 08:35 PM
Merge =( formula should retain fraction type numbers after merge. Aubrey Excel Worksheet Functions 0 February 9th 06 07:37 PM
how do i get my mail merge to update the data source at each merge Steel_Monkey Excel Discussion (Misc queries) 0 November 30th 05 08:41 AM


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