LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.misc,microsoft.public.excel
external usenet poster
 
Posts: 2
Default Merging adjacent repeated columns with a macro

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

 
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
Finding repeated data in adjacent cells akeene Excel Discussion (Misc queries) 3 July 14th 06 08:54 PM
Printing text in a repeated cell/row that is longer than repeated Valerie Dyet Excel Discussion (Misc queries) 1 February 13th 06 03:27 AM
Macro to Combine 2 columns to make one column without merging JRM Excel Discussion (Misc queries) 1 December 31st 05 08:27 PM
Repeated Columns Don't look same on all pages... Al Franz New Users to Excel 1 February 24th 05 02:59 PM
repeated transpose from rows to columns with unequal groups kraymond Excel Discussion (Misc queries) 3 December 20th 04 02:39 PM


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