View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Remove useless information

try

Sub consolitateem()
Application.ScreenUpdating = False
Sheets("sheet8").Range("j1:k35").Copy Range("a1")
mc = 2 'col B
For i = Cells(Rows.Count, mc).End(xlUp).Row To 2 Step -1
If Cells(i - 1, mc) = Cells(i, mc) Then
mysum = Cells(i, mc - 1) + Cells(i + 1, mc - 1)
Rows(i + 1).Delete
Else
mysum = 0
End If
Cells(i, mc - 1) = mysum
Next i
Rows(2).Delete
Application.ScreenUpdating = False
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"djaydida" wrote in message
...
How can add all the numbers for a total, and only Keep in all in one line.
Example below, nubers totals 9, but i only need that with one name, one
address, one city, one state, and one phone #...I have a spreadsheet that
have been working on for two days.

1 Mark Roy 5642 N. Heatherstone Drive Shreveport LA 71129-4814 (864)
844-2812
2 Mark Roy 5642 N. Heatherstone Drive Shreveport LA 71129-4814 (864)
844-2812
1 Mark Roy 5642 N. Heatherstone Drive Shreveport LA 71129-4814 (864)
844-2812
1 Mark Roy 5642 N. Heatherstone Drive Shreveport LA 71129-4814 (864)
844-2812
1 Mark Roy 5642 N. Heatherstone Drive Shreveport LA 71129-4814 (864)
844-2812
2 Mark Roy 5642 N. Heatherstone Drive Shreveport LA 71129-4814 (864)
844-2812
1 Mark Roy 5642 N. Heatherstone Drive Shreveport LA 71129-4814 (864)
844-2812