View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.newusers
Atom Oaks[_2_] Atom Oaks[_2_] is offline
external usenet poster
 
Posts: 3
Default Need help creating macros

Sorry, I did not realize that the format changed after I posted. This is how
my worksheet looks:

Purple Purple Purple Purple*
Purple " " " Green Green Green*
Blue Blue Blue Blue Red Red Red*
Yellow Yellow Yellow Yellow*
Yellow " " " Orange Orange Orange*
Brown Brown Brown Brown Teal Teal Teal*
Black Black Black Black Grey Grey Grey*

" = 1 blank cell
* = end of row

And I am trying to find and combine all the duplicate rows in Column A so
that my work sheet looks like this:

Purple Purple Purple Purple Green Green Green*
Blue Blue Blue Blue Red Red Red*
Yellow Yellow Yellow Yellow Orange Orange Orange*
Brown Brown Brown Brown Teal Teal Teal*
Black Black Black Black Grey Grey Grey*

So far, this is what I have come up with:

Sub CombineDelete()
'
' Macro2 Macro
' Macro recorded 1/8/2010 by Information Systems
'
' Keyboard Shortcut: Ctrl+q
'
Range(ActiveCell, ActiveCell.Offset(0, 10)).Select
Selection.Cut
ActiveCell.Offset(1, 0).Select
ActiveSheet.Paste
ActiveCell.Offset(-1, 0).Select
Selection.EntireRow.Delete
End Sub

It does the job, but requires that I manually locate the duplicates and use
a hotkey. So any ideas would be greatly appreciated. Hopefully this post is
much better. Thank you!