View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default Merging adjacent repeated columns with a macro

Instead of merging them, why not use a conditional format which "hides" the
duplicates with a white font.

http://www.ozgrid.com/Excel/Formulas.htm#CONDFORM

" wrote:

I have a relatively large spreadsheet with numerous values repeated
(within the same column) and I would like to merge adjacent, identical
cells.

I have attempted to tweak an existing macro that deletes repetitive,
adjacent cells without any sucess. Does anyone have any suggestions?

--Chris

My existing macro for deleting these cells:


Sub RemoveDuplicates()

totalrows = ActiveSheet.UsedRange.Rows.Count
For Row = totalrows To 2 Step -1
If Cells(Row, 2).Value = Cells(Row - 1, 2).Value Then
Rows(Row).Delete
End If
Next Row

End Sub