Remove useless information

  • Thread starter Thread starter djaydida
  • Start date Start date
D

djaydida

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top