LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default combining rows and deleting easy for u experts

Customer Name 2000 sales 2001 Sales 2002 sales

Joe Smith $200.00
Joe Smith $300.00
Joe Smith $250.00
Kip Tucker $100.00
Kip Tucker $175.00
Kip Tucker $225.00

I need to combine these on to one row but leave them under the
appropriate year and then delete the duplicate names

Should look like this

Customer Name 2000 sales 2001 Sales 2002 sales

Joe Smith $200.00 $300.00 $250.00
Kip Tucker $100.00 $175.00 $225.00

I copied a formula from this board that is close but isn't quite what I
need. Can someone modify this formula or write a new one

Sub combine()
r = 1
Do Until Cells(r, 1) = ""
If Cells(r + 1, 1) = Cells(r, 1) Then
Cells(r, 2) = Cells(r, 2) & "," & Cells(r + 1, 2)
Rows(r + 1).Delete
Else
r = r + 1
End If
Loop
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
Combining Spreadsheets easy or hard AndyN Excel Discussion (Misc queries) 1 January 7th 10 04:26 PM
Easy for the experts: Lookup,index,match.... DDD Excel Worksheet Functions 6 October 26th 06 03:15 PM
Easy Question for deleting rows. SITCFanTN New Users to Excel 3 June 5th 06 06:58 PM
Custom form on opening - I think it's an easy one for the experts David Excel Programming 4 June 4th 04 06:32 AM
Could one of you experts answer an easy question... Bryan[_5_] Excel Programming 2 September 9th 03 07:19 PM


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